Docker CE and Docker Compose in Debian or Ubuntu

Docker Community Edition or Docker CE is the old docker engine. This is free to use for the development and the production environment. Linux, Windows and Mac OS has the Docker CE installer available.

Docker EE is the enterprise edition which has lots of features from Docker Inc which is a paid version. Docker EE is not supported in the Debian Linux. That means, docker is discouraging to use Debian Linux for the host OS.

When you have an working Debian Linux and you have old docker running on it, and you need to update to the docker-ce, here is the update procedure.

1. Remove the old version

$ sudo apt-get remove docker docker-engine docker.io

2. Update the apt packages

$ sudo apt-get update

3. apt to allow over the https
Jessie or Stretch: $ sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Wheezy: $ sudo apt-get install apt-transport-https ca-certificates curl python-software-properties

4. Add docker pgp key,

$ curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo “$ID”)/gpg | sudo apt-key add –

5. Setup the repository

x86_64: $ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo “$ID”) $(lsb_release -cs) stable”

6. Install the Docker CE

$ sudo apt-get install docker-ce

7. Check the Docker version

$ docker version

INSTALL DOCKER COMPOSE
Docker compose is a tool that builds and run multiple container at a time. Most of the application we see in the github, that needs to build using docker-compose. This needs to be updated to build certain entries in the yml file.

1. Check the latest docker compose version from github “https://github.com/docker/compose/releases”

2. Install docker-compose

curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

3. Check the docker-compose version

$ docker-compose version

All set with the latest Docker and Docker compose installation in the Debian host OS. Docker has documentation of how to install Docker in different platforms like Mac, Windows (PC), AWS, Azure, Windows Server, CentOS, Fedora®, Oracle Enterprise Linux, RHEL, SLES, and Ubuntu in docs.docker.com.

Leave a Comment