Installing docker on Linux is as simple as installing any other Linux package, We don’t require the whole Docker toolbox for working with docker on Linux.
In this blog post, I will be talking about installing community edition installation of Docker.
To install Docker, you need the 64 bit version of either one of below Ubuntu-
- Xenial 16.04 (LTS)
- Trusty 14.04 (LTS)
- Yakkety 16.10
Uninstall older version of Docker – Older version of Docker called docker or docker-engine. if you have these then uninstall them, otherwise skip this part
sudo apt-get remove docker docker-engine
Install Docker – You can install the Docker in different ways, as per your needs
- Setup docker repositories and install from them – this is easy in installation and upgrades (recommended approach)
- Download the DEB package and install it manually and also manage upgrades manually (prefer when lack of internet access)
Install using Repository – If you are doing the setup for the first time on a new host machine, you need to setup the docker repository. Then you can use the same repository for install and updates
- Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
- Add Docker’s official GPG key :
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
sudo apt-key fingerprint 0EBFCD88 pub 4096R/0EBFCD88 2017-02-22 Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid Docker Release (CE deb) <email@example.com> sub 4096R/F273FCD8 2017-02-22
- use the below command to setup the stable repository
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
- Update the apt package
sudo apt-get update
- Install the latest / specific version of Docker with below commands
sudo apt-get install docker-ce //for latest version
sudo apt-get install docker-ce= //for specific version
- Verify that Docker CE is installed correctly by running a sample hello-world docker image-
sudo docker run hello-world
- You should see something like below if your installation is successful and complete
If you guys face issues in installation , please mention in comments section.
In the next blog post , we would be learning docker terminology and different docker components
To know more in details, hands-on and for personal / corporate training please reach out to – firstname.lastname@example.org