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.文章来源:https://www.toymoban.com/news/detail-450926.html$ 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.文章来源地址https://www.toymoban.com/news/detail-450926.html
到了这里,关于ubuntu 18.04安装docker的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!