Docker Installation
We can install docker on any operating system whether it is Mac, Windows, Linux or any cloud. Docker Engine runs natively on Linux distributions. Here, we are providing step by step process to install docker engine for Linux Ubuntu Xenial-16.04 [LTS].
Prerequisites:
Docker need two important installation requirements:
- It only works on a 64-bit Linux installation.
- It requires Linux kernel version 3.10 or higher.
To check your current kernel version, open a terminal and type uname -r command to display your kernel version:
Command:
Update apt sources
Follow following instructions to update apt sources.
- Open a terminal window.
- Login as a root user by using sudo command.
- Update package information and install CA certificates.
- Add the new GPG key. Following command downloads the key.
- Run the following command, it will substitute the entry for your operating system for the file.
- Open the file /etc/apt/sources.list.d/docker.listand paste the following line into the file.
- Now again update your apt packages index.
- Verify that APT is pulling from the right repository.
- Install the recommended packages.
Command:
See, the attached screen shot below.
Command:
Screen shot is given below.
See, the attached screen shot below.
See, the attached screen shot below.
See, the attached screen shot below.
Install the latest Docker version.
- update your apt packages index.
- Install docker-engine.
- Start the docker daemon.
- Verify that docker is installed correctly by running the hello-world image.
See, the attached screen shot below.
See, the attached screen shot below.
See, the attached screen shot below.
See, the attached screen shot below.
This above command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.