How To Install and Use Docker on Ubuntu 16.04?
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density.
Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.
Now let’s do the installation by this tutorial step by step.
1. Before we start our installation we need to get sure that all our Linux packages are up to date, and we can do this through the below command.
sudo apt-get update
2. Use the below command to add GPG key for the official Docker repository to the system.
sudo apt-key adv –keyserver hkp://p80.pool.sks-keyservers.net:80 –recv-keys 58118E89F3A912897C070ADBF76221572C52609D
3. Now, Let’s add the Docker repository to “APT” sources, by using the below command.
echo “deb https://apt.dockerproject.org/repo ubuntu-xenial main” | sudo tee /etc/apt/sources.list.d/docker.list
4. Let’s update the packages again, using below command.
sudo apt-get update
5. You have to make sure that you are installing from the Docker Repository, to verify that, use the below command.
apt-cache policy docker-engine
6. Time to install “Docker-Engine”, we can install it through the below command on “Terminal”.
sudo apt-get install -y docker-engine
7. Once the installation is done, we can check the status of Docker by the below command on “Terminal”.
sudo systemctl status docker
8. Use the below command, to start “Docker” service.
sudo service docker start
9. To know all the commands and subcommands of “Docker”, just write “Docker” on “Terminal”, like the below image, and it will display all the commands.
10. You can dig for images that are available on “Docker Hub” by using the below command.
After this tutorial, you should be able to understand how you can install and use “Docker” on Ubuntu Linux 16.04.