Set up and install Docker CE for Debian Jessie

 how to setup docker on dev machine with debian

Set up Docker for Debian Jessie or upper version

Contents

[responsivevoice_button voice=”US English Female” buttontext=”Play Audio Article”]

Update the apt package index

$ sudo apt-get update

 

Install packages to allow apt to use a repository over HTTPS:

sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -

Verify that the key ID 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) <docker@docker.com>
sub   4096R/F273FCD8 2017-02-22
</docker@docker.com>

Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or testing repositories as well. To add the edge or testing repository, add the word edge or testing (or both) after the word stable in the commands below.

Note: The lsb_release -cs sub-command below returns the name of your Debian distribution, such as jessie.

To also add the edge repository, add edge after stable on the last line of the command.

 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable"

Install Docker CE

 

Clker-Free-Vector-Images / Pixabay

Update the apt package index.

sudo apt-get update

Install the latest version of Docker CE, or go to the next step to install a specific version. Any existing installation of Docker is replaced.

sudo apt-get install docker-ce

On production systems, you should install a specific version of Docker CE instead of always using the latest. This output is truncated. List the available versions:

apt-cache madison docker-ce docker-ce | 17.06.0~ce-0~debian-jessie | https://download.docker.com/linux/debian jessie/stable amd64 Packages

The Docker daemon starts automatically.

Verify that Docker CE is installed correctly by running the hello-world image.

sudo docker run hello-world

Test

sudo docker pull softreck/zamowienia

sudo docker run -d -p 80:8080 softreck/zamowienia

list of docker’s, stop one and all docker’s

sudo docker ps

Stop docker by name

sudo docker stop priceless_swartz

Stop all docker’s

sudo docker stop $(sudo docker ps -a -q)
Tom Sapletta
Facebooktwitterredditpinterestlinkedinmail

Author: Tom Sapletta

I connect the expiriences with new ideas. I have been passionate about computers and programming for 10 years. My first (micro) computer was ZX-Spectrum and the programming language was Basic. Since 2010, I have been programming professionally, objectively and functionally in monolithic and micro-service architectures. I am currently creating an ecosystem architecture at API foundation.