Docker is available in two editions, Community Edition (CE) and Enterprise Edition (EE):
- Docker Community Edition (CE): It is ideal for developers and small teams looking to get started with Docker and may be experimenting with container-based apps
- Docker Enterprise Edition (EE): It is designed for enterprise development and IT teams who build, ship, and run business critical applications in production at scale
This section will demonstrate the instructions for installing Docker CE on Ubuntu 16.04. The Docker installation package, available in the official Ubuntu 16.04 repository, may not be the latest version. To get the latest and greatest version, install Docker from the official Docker repository. This section shows you how to do just that:
- First, add the GPG key for the official Docker repository to the system:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
sudo apt-key add
- Add the Docker repository to APT sources:
$ sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- Next, update the package database with the Docker packages from the newly added repository:
$ sudo apt-get update
- Make sure you are about to install Docker repository instead of the default Ubuntu 16.04 repository:
$ apt-cache policy docker-ce
- You should see an output similar to the following:
docker-ce: Installed: (none) Candidate: 17.06.0~ce-0~ubuntu Version table: 17.06.0~ce-0~ubuntu 500 500 https://download.docker.com/linux/ubuntu xenial/stable
amd64 Packages 17.03.2~ce-0~ubuntu-xenial 500 500 https://download.docker.com/linux/ubuntu xenial/stable
amd64 Packages 17.03.1~ce-0~ubuntu-xenial 500 500 https://download.docker.com/linux/ubuntu xenial/stable
amd64 Packages 17.03.0~ce-0~ubuntu-xenial 500 500 https://download.docker.com/linux/ubuntu xenial/stable
amd64 Packages
Notice that docker-ce is not installed, but the candidate for installation is from the Docker repository for Ubuntu 16.04. The docker-ce version number might be different.
- Finally, install Docker:
$ sudo apt-get install -y docker-ce
- Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it's running:
$ sudo systemctl status docker docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled;
vendor preset: enabled) Active: active (running) since Sun 2017-08-13 07:29:14 UTC; 45s
ago Docs: https://docs.docker.com Main PID: 13080 (dockerd) CGroup: /system.slice/docker.service ├─13080 /usr/bin/dockerd -H fd:// └─13085 docker-containerd -l
unix:///var/run/docker/libcontainerd/docker-containerd.sock --
metrics-interval=0 --start
- Verify that Docker CE is installed correctly by running the hello-world image:
$ sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world b04784fba78d: Pull complete Digest:
sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26
ff74f Status: Downloaded newer image for hello-world:latest Hello from Docker!
This message shows that your installation appears to be
working correctly. To generate this message, Docker took the following steps:
The Docker client contacted the Docker daemon
The Docker daemon pulled the hello-world image from the Docker Hub
The Docker daemon created a new container from that image,
which ran the executable that produced the output you are
currently reading
The Docker daemon streamed that output to the Docker client,
which sent it to your terminal
To try something more ambitious, you can run an Ubuntu
container with the following:
$ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas,
visit: https://docs.docker.com/engine/userguide/.