Uninstall old versions
Install Docker CE Pre
- Update the apt package index:
- Install packages to allow apt to use a repository over HTTPS:
- Add Docker’s official GPG key:
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
- Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
Install Docker CE
- Update the apt package index.
- Install the latest version of Docker CE and containerd, or go to the next step to install a specific version:
- To install a specific version of Docker CE, list the available versions in the repo, then select and install:
a. List the versions available in your repo:
b. Install a specific version using the version string from the second column, for example, 5:18.09.1~3-0~debian-stretch .
- Verify that Docker CE is installed correctly by running the hello-world image.