from:Install Docker Engine on Ubuntu | Docker Documentation
Install from a package
If you can’t use Docker’s apt
repository to install Docker Engine, you can download the deb
file for your release and install it manually. You need to download a new file each time you want to upgrade Docker Engine.
-
Go to Index of linux/ubuntu/dists/.
-
Select your Ubuntu version in the list.
-
Go to
pool/stable/
and select the applicable architecture (amd64
,armhf
,arm64
, ors390x
). -
Download the following
deb
files for the Docker Engine, CLI, containerd, and Docker Compose packages:containerd.io_<version>_<arch>.deb
docker-ce_<version>_<arch>.deb
docker-ce-cli_<version>_<arch>.deb
docker-buildx-plugin_<version>_<arch>.deb
docker-compose-plugin_<version>_<arch>.deb
-
Install the
.deb
packages. Update the paths in the following example to where you downloaded the Docker packages.$ sudo dpkg -i ./containerd.io_<version>_<arch>.deb \ ./docker-ce_<version>_<arch>.deb \ ./docker-ce-cli_<version>_<arch>.deb \ ./docker-buildx-plugin_<version>_<arch>.deb \ ./docker-compose-plugin_<version>_<arch>.deb
The Docker daemon starts automatically.
-
Verify that the Docker Engine installation is successful by running the
hello-world
image.$ sudo service docker start $ sudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.