<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chirag NK</title>
    <description>The latest articles on DEV Community by Chirag NK (@chiragnk).</description>
    <link>https://dev.to/chiragnk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1016234%2F9cf2338e-9c88-4046-966f-617517de18ed.jpeg</url>
      <title>DEV Community: Chirag NK</title>
      <link>https://dev.to/chiragnk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chiragnk"/>
    <language>en</language>
    <item>
      <title>A quick guide to SSH &amp; Solutions to some Common SSH errors</title>
      <dc:creator>Chirag NK</dc:creator>
      <pubDate>Sun, 19 Mar 2023 15:52:56 +0000</pubDate>
      <link>https://dev.to/chiragnk/brief-guide-to-ssh-solutions-to-some-common-ssh-errors-31bn</link>
      <guid>https://dev.to/chiragnk/brief-guide-to-ssh-solutions-to-some-common-ssh-errors-31bn</guid>
      <description>&lt;p&gt;Imagine you are debugging a Prod issue, you try to ssh into the Linux server where the services are running, and the connection fails, throwing an error "Permission denied!" despite providing the right key/credentials to access it.!&lt;br&gt;
and we will be like "Idella ivagle agbekitta!?/ abhi hi hona tha kya".&lt;br&gt;
we the Op's guys have faced it several times, so here in this article, I've covered the concepts such as, How SSH works, followed by what are some of the common connectivity errors, How to debug it, &amp;amp; what are the best practices to work with remote servers.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is SSH? and How does it work?
&lt;/h3&gt;

&lt;p&gt;SSH (short for Secure Shell) is a network protocol that provides a secure way for two computers to connect remotely. SSH employs encryption to ensure that hackers cannot interpret the traffic between two connected devices. Main use cases for SSH are: Remote access &amp;amp; File Transfer(SFTP)&lt;br&gt;
  If you’re using Linux or Mac, SSH comes preinstlled(OpenSSH), &amp;amp; for windows it requires an SSH client like PuTTY.&lt;/p&gt;

&lt;h5&gt;
  
  
  What are SSH keys?
&lt;/h5&gt;

&lt;p&gt;SSH keys always come in pairs, and every pair is made up of a private key and a public key. Who or what possesses these keys determines the type of SSH key pair. If the private key and the public key remain with the user, this set of SSH keys is referred to as user keys.&lt;br&gt;
If the private and public keys are on a remote system, then this key pair is referred to as &lt;code&gt;host keys&lt;/code&gt;. Another type of SSH key is a &lt;code&gt;session key&lt;/code&gt;. When a large amount of data is being transmitted, session keys are used to encrypt this information.&lt;br&gt;
Functionally SSH keys resemble passwords. &lt;br&gt;
An SSH key is an access credential in the SSH protocol. Its function is similar to that of user names and passwords, but the keys are primarily used for automated processes and for implementing single sign-on by system administrators and power users.&lt;br&gt;
The authorized_keys file in SSH specifies the SSH keys that can be used for logging into the user account for which the file is configured(public key of host). This file is usually found in the user's home directory under /. ssh/authorized_keys&lt;/p&gt;

&lt;h5&gt;
  
  
  What do SSH keys look like
&lt;/h5&gt;

&lt;p&gt;An authorized key can look like this:&lt;br&gt;
&lt;code&gt;ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBN+Mh3U/3We4VYtV1QmWUFIzFLTUeegl1Ao5/QGtCRGAZn8bxX9KlCrrWISIjSYAwCajIEGSPEZwPNMBoK8XD8Q= CN@CI-serv&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;An identity key can look like this:&lt;br&gt;
&lt;code&gt;-----BEGIN EC PRIVATE KEY----- MHcCAQEEIJWbvSW7h50HPwG+bWR3DXgQ6YhOxYbe0ifr1rRUvsUuoAoGCCqGSM49 AwEHoUQDQgAE34yHdT/dZ7hVi1XVCZZQUjMUtNR56CXUCjn9Aa0JEYBmfxvFf0qU KutYhIiNJgDAJqMgQZI8RnA80wGgrxcPxA== -----END EC PRIVATE KEY-----&lt;/code&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Knownhost key in detail
&lt;/h5&gt;

&lt;p&gt;The memorized host keys are called known host keys and they are stored in a file called known_hosts in OpenSSH. As long as host keys don't change, this appoach is very easy to use and provides fairly good security. &lt;/p&gt;

&lt;h5&gt;
  
  
  Session key in detail
&lt;/h5&gt;

&lt;p&gt;A session key in SSH is an encryption key used for encrypting the bulk of the data in a connection. The session key is negotiated during the connection and then used with a symmetric encryption algorithm and a message authentication code algorithm to protect the data&lt;/p&gt;

&lt;h5&gt;
  
  
  The SSH command consists of 3 distinct parts:
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;ssh {user}@{host}&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;The SSH protocol is based on the client-server model. Therefore, an SSH client must initiate an SSH session with an SSH server. The host (server) listens on port 22 (or any other SSH assigned port) for incoming connections. Most of the connection setup is conducted by the SSH client itself. Public key is used to verify the identity of the SSH server, and then symmetric key encryption and hashing algorithms are used to maintain data transmission in ciphertext. That way, privacy and integrity of data transmission in both directions between the client and server is assured, man-in-the-middle attacks will be mitigated.&lt;/p&gt;

&lt;h5&gt;
  
  
  The steps involved in creating an SSH session go like this:
&lt;/h5&gt;

&lt;p&gt;1.&lt;code&gt;Connection establishment&lt;/code&gt;: The SSH server listens to a connection request sent by the client on a specific port. After the client sends a connection request to the server, a TCP connection is set up between the client and server.&lt;br&gt;
2.&lt;code&gt;Version negotiation&lt;/code&gt;: The SSH server and client negotiate with each other to determine an SSH version to be used.&lt;br&gt;
3.&lt;code&gt;Key exchange&lt;/code&gt;: The server and client use a key exchange algorithm to dynamically generate a shared session key and session ID used to establish an encrypted channel. The session key is used to encrypt subsequent data for transmission, and the session ID is used to identify the related SSH connection during authentication.&lt;br&gt;
4.&lt;code&gt;User authentication&lt;/code&gt;: The client sends an authentication request to the server, and then the server authenticates the client. SSH supports the following authentication modes:&lt;br&gt;
•Password authentication: The client sends the encrypted username and password to the server. The server decrypts the username and password, compares them with the locally stored username and password, respectively, and returns an authentication success or failure message to the client.&lt;br&gt;
•Public key authentication: The client uses the username, public key, and public key algorithm to exchange data with the server for authentication.&lt;br&gt;
•Password+public key authentication: The client can log in to the system only after being authenticated by the server using both password authentication and public key authentication.&lt;br&gt;
5.&lt;code&gt;Session request&lt;/code&gt;: After the authentication succeeds, the SSH client sends a session request to the server, requesting the server to provide a certain type of service. That is, the SSH client requests to establish a session with the server.&lt;br&gt;
6.&lt;code&gt;Session interaction&lt;/code&gt;: After a session is established, the SSH server and client can exchange data.&lt;/p&gt;

&lt;p&gt;I suggest you to try the verbose mode &lt;code&gt;-v&lt;/code&gt; which will show the step-by-step process for connecting to a remote computer,(use -vvv for more details from both ends),This further helps in debugging the connectivoty issues.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8WWeptsA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lxslerl9djtbt50en42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8WWeptsA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lxslerl9djtbt50en42.png" alt="ssh verbose" width="880" height="254"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Some common ssh errors and solutions:
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;"Permission denied (publickey)"&lt;br&gt;
This error comes when you messed up with the authorized_keys of the User in the Host, May the entry is not exist, or the permission &amp;amp; ownership to the .ssh directory isnt correct&lt;br&gt;
sol: login as root &amp;gt; switch to user account &amp;gt; check for the above said file.&lt;br&gt;
Second possibility is when you are using password-based authentication, you must set &lt;code&gt;PasswordAuthentication&lt;/code&gt; to &lt;code&gt;yes&lt;/code&gt;&lt;br&gt;
Log as as a root to the Host&lt;br&gt;
vi /etc/ssh/sshd_config&lt;br&gt;
make changes as said above and restart the sshd service&lt;br&gt;
&lt;code&gt;service sshd reload&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Host key verification failed"&lt;br&gt;
this error means that the host key of the remote host was changed.&lt;br&gt;
SSH stores the host keys of the remote hosts in ~/.ssh/known_hosts. You can either edit that text file manually and remove the old key (you can see the line number in the error message), or use&lt;br&gt;
&lt;code&gt;ssh-keygen -R hostname&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"No route to host"&lt;br&gt;
possibilities would be,&lt;br&gt;
•host is unreachable, check using &lt;code&gt;ping&lt;/code&gt; command&lt;br&gt;
•If you have a firewall service running on your host machine,check if is blocking the ssh port&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"connection refused"&lt;br&gt;
possibilities would be,&lt;br&gt;
•Your SSH Service Is Down&lt;br&gt;
•You Have the Wrong Credentials&lt;br&gt;
•The Port You’re Trying to Use Is Closed&lt;br&gt;
use this command to check &lt;code&gt;sudo lsof -i -n -P | grep LISTEN&lt;/code&gt;&lt;br&gt;
•Firewall Settings Are Preventing an SSH Connection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Too many authentication failures"&lt;br&gt;
if you are trying to login to root user, Check sshd_config and verify that root login is permitted. sshd will need to be restarted if the setting changes.&lt;br&gt;
another possibility is that Your SSH server's MaxAuthTries limit was exceeded. It happens so that Your client is trying to authenticate with all possible keys stored in /home/USER/.ssh/ .&lt;br&gt;
This situation can be solved by these ways:&lt;br&gt;
•&lt;code&gt;ssh -i /path/to/id_rsa root@host&lt;/code&gt;&lt;br&gt;
•Specify &lt;code&gt;Host/IdentityFile&lt;/code&gt; pair in &lt;code&gt;/home/USER/.ssh/config&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;




&lt;h4&gt;
  
  
  Troubleshooting:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;use "-vvv" option&lt;/li&gt;
&lt;li&gt;Make sure your IdentiyFile points to your right PRIVATE key.&lt;/li&gt;
&lt;li&gt;Suppose you are able to login to the Host by any other means then switch to the required User (using sudo su - username) and check if it contains the .ssh directory,authorized_keys, and right public key in it.&lt;/li&gt;
&lt;li&gt;Sometimes the issue comes from permissions and ownership.
Verify the ownership of .ssh directory under the home folder, if you have messed up with it, change the ownership back,
&lt;code&gt;chown -R your_user:your_user .ssh&lt;/code&gt;
Permissions should be 700 for .ssh and 600 for the files within (authorized_keys)
&lt;code&gt;chmod 700 .ssh
chmod 600 .ssh/authorized_keys&lt;/code&gt;
(ssh-keygen will create files and directories for you with the proper permissions)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tail -f /var/log/auth.log&lt;/code&gt; (on the server) and monitor errors when you attempt to login (if you were able to login via any other methods, such as aws ssm)&lt;/li&gt;
&lt;li&gt;If you have many key files, try IdentitiesOnly yes to limit the authentication to use the single, specified key.&lt;/li&gt;
&lt;li&gt;check value of &lt;code&gt;PasswordAuthentication&lt;/code&gt; in &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; if you require password-based authentication(not recommended) then it to &lt;code&gt;yes&lt;/code&gt;. Don't forget to restart ssh service after that.
&lt;code&gt;service sshd reload&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;This ends up the oobjective of this article, :) If you wants to read further, Here are details of some more ssh commands and their functionalities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In addition to the ssh executable, SSH has other executable commands used for additional functions, including the following:&lt;br&gt;
-&lt;code&gt;sshd&lt;/code&gt; initiates the SSH server, which waits for incoming SSH connection requests and enables authorized systems to connect to the local host.&lt;br&gt;
-&lt;code&gt;ssh-keygen&lt;/code&gt; is a program to create a new authentication key pair for SSH, which can be used to automate logins, to implement SSO and to authenticate hosts.&lt;br&gt;
-&lt;code&gt;ssh-copy-id&lt;/code&gt; is a program used to copy, install and configure an SSH key on a server to automate passwordless logins and SSO.&lt;br&gt;
-&lt;code&gt;ssh-add&lt;/code&gt; is used to add a key to the SSH authentication agent and is used with ssh-agent to implement SSO using SSH.&lt;br&gt;
-&lt;code&gt;scp&lt;/code&gt; is a program used for copying files from one computer to another and is an SSH-secured version of rcp.&lt;br&gt;
-&lt;code&gt;sftp&lt;/code&gt; is a program used to copy files from one computer to another and is an SSH-secured version of ftp, the original File Transfer Protocol. &lt;/p&gt;

&lt;p&gt;Thanks! for reading, leave a comment and let me know what you have felt about the article, and feedbacks on the same. :)&lt;/p&gt;

</description>
      <category>ssh</category>
      <category>linux</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Clear up the confusions with Dockerfile instructions</title>
      <dc:creator>Chirag NK</dc:creator>
      <pubDate>Sun, 19 Mar 2023 07:04:18 +0000</pubDate>
      <link>https://dev.to/chiragnk/clear-up-the-confusions-with-dockerfile-instructions-56ag</link>
      <guid>https://dev.to/chiragnk/clear-up-the-confusions-with-dockerfile-instructions-56ag</guid>
      <description>&lt;p&gt;Yes, We all get confusions while writing the Dockerfile for the first time on our own(without copying from internet ¯(°_o)/¯ ). People usually get confused with CMD vs RUN, ENTRYPOINT VS CMD etc, So in this article we will try to resolve all the confusions.&lt;/p&gt;

&lt;p&gt;Let's start with some basics,&lt;br&gt;
A Dockerfile contains a set of instructions that are executed step by step when you use the docker build command to build the docker image. It contains certain instructions and commands that decide the structure of your image, contains information related to the packages and libraries to be installed in the container and many more.&lt;/p&gt;

&lt;p&gt;Here is a list of all the important instructions that are extensively used in a Dockerfile and their functions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftim9v3wyuyl8k2gz9wd2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftim9v3wyuyl8k2gz9wd2.png" alt="Dockerfile instructions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#To deploy a simple node.js app
FROM node:10
LABEL authors="Username"
# update dependencies and install curl
RUN apt-get update &amp;amp;&amp;amp; apt-get install -y \
    curl \
    &amp;amp;&amp;amp; rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /usr/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY package*.json ./
# update each dependency in package.json to the latest version
RUN npm install -g npm-check-updates \
    ncu -u \
    npm install \
    npm install express 
# If you are building your code for production
RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 3000
CMD [ "node", "server.js" ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's learn more about each instruction,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FROM&lt;/strong&gt;&lt;br&gt;
The FROM instruction initializes a new build stage and sets the Base Image for subsequent instructions. The FROM command is of the form −&lt;br&gt;
&lt;code&gt;FROM &amp;lt;image name&amp;gt;:&amp;lt;tag name&amp;gt;&lt;/code&gt;&lt;br&gt;
A FROM command allows you to create a base image which is actually an operating system, comes with necessary tools preinstalled. All the instructions executed after this command take place on this base image. It contains an image name and an optional tag name.&lt;br&gt;
Example:&lt;br&gt;
&lt;code&gt;FROM ubuntu&lt;br&gt;
 FROM centos:7&lt;br&gt;
 FROM python:3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RUN&lt;/strong&gt;&lt;br&gt;
A RUN instruction is used to run specified commands. Suppose,&lt;br&gt;
we may need to install a bunch of packages &amp;amp; libraries which we will be required by our application to start, these can be installed using RUN.&lt;br&gt;
A Dockerfile can have many RUN steps that layer on top of one another to build the image. But the efficient approach is to combine all the RUN instructions into a single one.&lt;br&gt;
Some example of RUN commands are −&lt;br&gt;
&lt;code&gt;RUN apt−get −y install vim&lt;br&gt;
 RUN apt−get −y update&lt;/code&gt;&lt;br&gt;
we can chain multiple RUN instructions in the following way −&lt;br&gt;
&lt;code&gt;RUN apt−get −y update \&lt;br&gt;
  &amp;amp;&amp;amp; apt−get −y install firefox \&lt;br&gt;
  &amp;amp;&amp;amp; apt−get −y install vim&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CMD&lt;/strong&gt;&lt;br&gt;
If you want to run a docker container by specifying a default command that gets executed for all the containers of that image by default, you can use a CMD command. In case you specify a command during the docker run command, it overrides the default one. Specifying more than one CMD instructions, will allow only the last one to get executed.&lt;/p&gt;

&lt;p&gt;Example of a CMD command −&lt;br&gt;
&lt;code&gt;CMD echo "Container is ready"&lt;/code&gt;&lt;br&gt;
If you specify the above line in the Dockerfile and run the container using the following command without specifying any arguments, the output will be “Container is ready”&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo docker run −it &amp;lt;image_name&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Output − “Container is ready”&lt;/code&gt;&lt;br&gt;
Note: In case you try to specify any other arguments such as /bin/bash, etc, the default CMD command will be overridden.&lt;/p&gt;

&lt;p&gt;Do RUN and CMD can be used interchangeably?&lt;br&gt;
Answer is NO!, &lt;br&gt;
RUN - command triggers while we build the docker image.&lt;br&gt;
      Can be many, e.g. install multiple libraries&lt;br&gt;
CMD - command triggers while we launch the created docker &lt;br&gt;
      Can only have 1, which is your execute start point (e.g. &lt;br&gt;
      ["npm", "start"], ["node", "app.js"])&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ENTRYPOINT&lt;/strong&gt;&lt;br&gt;
The difference between ENTRYPOINT and CMD is that, if you try to specify default arguments in the docker run command, it will not ignore the ENTRYPOINT arguments. The exec form of an ENTRYPOINT command is −&lt;br&gt;
&lt;code&gt;ENTRYPOINT [“&amp;lt;executable-command&amp;gt;”, “&amp;lt;parameter 1&amp;gt;”, “&amp;lt;parameter 2&amp;gt;”, ….]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you have used the exec form of the ENTRYPOINT instruction, you can also set additional parameters with the help of CMD command. For example −&lt;br&gt;
&lt;code&gt;ENTRYPOINT ["/bin/echo", "Welcome"]&lt;br&gt;
CMD ["Hello World!"]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Running docker run command without any argument would output −&lt;br&gt;
&lt;code&gt;Welcome Hello World!&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you specify any other CLI arguments, “Hello World!” will get overridden.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WORKDIR&lt;/strong&gt;&lt;br&gt;
You can specify your working directory inside the container using the WORKDIR instruction. Any other instruction after that, in the Dockerfile, will be executed on that particular working directory only.&lt;/p&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;code&gt;WORKDIR /usr/src/app&lt;/code&gt;&lt;br&gt;
Sets the working directory to /usr/src/app inside the container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;COPY&lt;/strong&gt;&lt;br&gt;
This instruction allows you to copy a directory from your local machine to the docker container.&lt;br&gt;
For example,&lt;br&gt;
&lt;code&gt;FROM ubuntu&lt;br&gt;
 WORKDIR /usr/src/app&lt;br&gt;
 COPY ∽/Desktop/myapp .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This would copy all the files inside the directory ∽/Desktop/myapp in your local machine to your current working directory inside the docker container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ADD&lt;/strong&gt;&lt;br&gt;
Similar to COPY instruction, you can use ADD to copy files and folders from your local machine to docker containers. However, ADD also allows you to copy files from a URL as well as a tar file.&lt;br&gt;
For example,&lt;br&gt;
&lt;code&gt;ADD ∽/Desktop/myapp/practice.tar.gz /usr/src/app&lt;/code&gt;&lt;br&gt;
Would copy all the contents inside the tar file to /usr/src/app inside the container.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ADD &amp;lt;URL such as a github url&amp;gt; &amp;lt;Destination path inside the container&amp;gt;&lt;/code&gt;&lt;br&gt;
This command would copy all the files inside the GitHub URL to the destination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXPOSE&lt;/strong&gt;&lt;br&gt;
The EXPOSE instruction inside the Dockerfile informs that the container is listening to the specified port in the network. The default protocol is TCP.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;code&gt;EXPOSE 8080&lt;/code&gt;&lt;br&gt;
Will map the 8080 port to the container.&lt;br&gt;
You can use the −p flag with the docker run command to make the container listen to another container or the host machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LABEL&lt;/strong&gt;&lt;br&gt;
You can use a LABEL instruction to add description or metadata for a docker image. It's a key−value pair.&lt;/p&gt;

&lt;p&gt;Example −&lt;br&gt;
&lt;code&gt;LABEL description="This is a sample image"&lt;/code&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerfile</category>
      <category>containerisation</category>
      <category>dockerfileinstructions</category>
    </item>
    <item>
      <title>Right time to get AWS cloud certified, with 50% savings ($150) on Professional Certifications</title>
      <dc:creator>Chirag NK</dc:creator>
      <pubDate>Tue, 14 Feb 2023 15:43:18 +0000</pubDate>
      <link>https://dev.to/chiragnk/right-time-to-get-aws-cloud-certified-with-50-off-save-150-on-professional-certifications-gpf</link>
      <guid>https://dev.to/chiragnk/right-time-to-get-aws-cloud-certified-with-50-off-save-150-on-professional-certifications-gpf</guid>
      <description>&lt;p&gt;For those, who were waiting to get AWS certification, But worrying about its price, Here's a chance to save &lt;strong&gt;$150&lt;/strong&gt; using the discount voucher,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgtkc83uzi1cdj2tp8e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgtkc83uzi1cdj2tp8e6.png" alt=" " width="742" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What actually it is:&lt;br&gt;
 AWS gives some discounts for all the aspirants who are planning to advance their career by obtaining a cloud certification, &lt;br&gt;
 AWS is conducting a Professional Challenge (so called), for their promotion as well as to grab the users towards the services AWS provides.&lt;/p&gt;

&lt;p&gt;So, Here is how to get the discount vouchers,&lt;/p&gt;

&lt;p&gt;• click on this link that takes you to the Registration page of AWS Professional Challenge &lt;a href="https://bit.ly/awssapro23" rel="noopener noreferrer"&gt;Link&lt;/a&gt;&lt;br&gt;
• This Voucher is valid on the below 2 professional certifications,&lt;br&gt;
1.AWS CERTIFIED SOLUTIONS ARCHITECT - PROFESSIONAL&lt;br&gt;
2.AWS CERTIFIED DEVOPS ENGINEER - PROFESSIONAL&lt;/p&gt;

&lt;p&gt;Although, These professional certificates doesn't require you to be having an Associate level certificate (&lt;strong&gt;Not Mandatory&lt;/strong&gt;), but it is good to start with the associate level/Foundational level certificate before attending the professional cert exams&lt;/p&gt;

&lt;p&gt;• &lt;a href="https://d1.awsstatic.com/training-and-certification/docs-devops-pro/AWS-Certified-DevOps-Engineer-Professional_Exam-Guide.pdf" rel="noopener noreferrer"&gt;AWS Certified DevOps Engineer - Professional Exam Guide&lt;/a&gt; : &lt;br&gt;
• &lt;a href="https://d1.awsstatic.com/training-and-certification/docs-sa-pro/AWS-Certified-Solutions-Architect-Professional_Exam-Guide.pdf" rel="noopener noreferrer"&gt;AWS Certified Solutions Architect - Professional Exam Guide &lt;/a&gt;: &lt;/p&gt;

&lt;p&gt;As you might aware , these professional certifications are not easy to pass, AWS recommends you to should be having experience in the following (&lt;strong&gt;But Not Mandatory&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw099owmhipejvhsvsjy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw099owmhipejvhsvsjy3.png" alt=" " width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xrw3z16m37hphxnn5ct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1xrw3z16m37hphxnn5ct.png" alt=" " width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But Wait !&lt;/strong&gt;, No need to worry if you do not have relevant experience,&lt;br&gt;
As AWS provides many resources that help to get hands on experience to AWS services,&lt;/p&gt;

&lt;p&gt;Here are some great resources, that can help you with hands on experience as well as to prepare you to the exam,&lt;/p&gt;

&lt;p&gt;🔸 &lt;a href="https://explore.skillbuilder.aws/learn" rel="noopener noreferrer"&gt;skillbuilder.aws&lt;/a&gt; over 500+ digital free training courses&lt;br&gt;
🔸 &lt;a href="https://aws.amazon.com/developer/" rel="noopener noreferrer"&gt;developer.aws&lt;/a&gt; explore hands-on tutorials and events&lt;br&gt;
🔸 &lt;a href="https://repost.aws/" rel="noopener noreferrer"&gt;repost.aws&lt;/a&gt; ask technical questions and get help from experts&lt;br&gt;
🔸 &lt;a href="https://workshops.aws/" rel="noopener noreferrer"&gt;workshops.aws&lt;/a&gt; over 100+ detailed free workshops and immersion days&lt;/p&gt;

&lt;p&gt;Happy Learning! :)&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
