What is Docker ?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and deploy it as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.
Why Docker ?
Docker Installation on ubuntu 18.04.3 LTS
In this post, i will show you step by step to install docker on Ubuntu operating system, i prefer to create account on docker hub here.
update the existing list of packages using
sudo apt update
Step #2 :
install prerequisite packages which will let apt use packages over HTTPS
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Step #3: –
add GPG key for the official Docker repository to your system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Step #4 :-
Add the Docker repository to APT sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Step #5: –
sudo apt-get install docker-ce
Step #6: –
Verify that Docker CE is installed correctly by running the hello-world image.
sudo docker run hello-world
You can could face an issue related to Hello-world Command when you are trying to verify the installation which is
permission denied while trying to connect to the docker daemon socket at unix /var/run/docker.sock: connect: permission denied
You can solve this issue by fire the below command and try again
sudo chmod 666 /var/run/docker.sock
Also you can list all the available docker version By running the below command
apt list -a docker-ce
Check if the services is up and running: –
sudo systemctl status docker
Docker documentation here
Cheer and enjoy the docker