Docker supports the following Debian versions:
Buster 10
Stretch 9 (stable) / Raspbian Stretch
Docker Engine-Community is supported on x86 / 64 (or amd64) armhf, and arm64 architecture. The installation commands are as follows: You can also use the domestic daocloud one-click installation command: Older versions of Docker are called docker,docker.io or docker-engine. If you have installed them, uninstall them: Before installing Docker Engine-Community on the new host for the first time, you need to set up the Docker repository. You can then install and update Docker from the repository. Raspbian users cannot use this method! For Raspbian, the use of a repository for installation is not yet supported. You must use shell scripting instead. Update the apt package index. Install the apt dependency package, which is used to obtain the repository through HTTPS. Add the official GPG key for Docker: 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 verifies that you now have a key with a fingerprint by searching for the last 8 characters of the fingerprint. Use the following instructions to set up the stable version repository: Update the apt package index: Install the latest version of Docker Engine-Community and containerd, or go to the next step to install a specific version: To install a specific version of Docker Engine-Community, list the available versions in the repository, and then select an installation. List the versions available in your warehouse: Install a specific version using the version string in the second column, for example, 5 0~debian-stretch 18.09.1 version 3-version. To test whether Docker is installed successfully, enter the following instructions and print out the following information for successful installation: Delete the installation package: Delete images, containers, configuration files, etc.: 2.4.1. Use the official installation script to install automatically ¶
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
curl -sSL https://get.daocloud.io/docker | sh
2.4.2. Manual installation ¶
Uninstall the old version ¶
$ sudo apt-get remove docker docker-engine docker.io containerd runc
Install Docker Engine-Community ¶
Use the Docker repository for installation ¶
Set up the warehouse ¶
$ sudo apt-get update
$ sudo apt-get install \\
apt-transport-https \\
ca-certificates \\
curl \\
gnupg2 \\
software-properties-common
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
$ 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
$ sudo add-apt-repository \\
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian
\\
$(lsb_release -cs) \\
stable"
2.4.3. Install Docker Engine-Community ¶
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ apt-cache madison docker-ce
docker-ce \| 5:18.09.1~3-0~debian-stretch \|
https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64
Packages
docker-ce \| 5:18.09.0~3-0~debian-stretch \|
https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64
Packages
docker-ce \| 18.06.1~ce~3-0~debian \|
https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64
Packages
docker-ce \| 18.06.0~ce~3-0~debian \|
https://mirrors.ustc.edu.cn/docker-ce/linux/debian stretch/stable amd64
Packages
...
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest:
sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
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:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker
Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs
the
executable that produces the output you are currently reading.
4. 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:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
2.4.4. Uninstall docker ¶
sudo apt-get purge docker-ce
sudo rm -rf /var/lib/docker