177 字
1 分钟
ubuntu 安装docker
2025-01-04

https://docs.docker.com/engine/install/ubuntu/

https://www.cnblogs.com/mingcore/p/18585749

https://www.cnblogs.com/mingcore/p/18585749

sudo apt-get update

sudo apt-get install ca-certificates curl

sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg sudo apt-key add -

sudo add-apt-repository “deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable”

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

vim /etc/docker/daemon.json

{ “registry-mirrors”: [“https://dockerpull.org”,“https://docker.unsee.tech/”,“https://docker.1panel.live/”,“https://docker.udayun.com/”,“https://docker.nastool.de/”] }

sudo systemctl daemon-reload sudo systemctl restart docker

evan@panther:/etc/apt$ sudo docker run hello-world Unable to find image ‘hello-world’ locally latest: Pulling from library/hello-world c1ec31eb5944: Pull complete Digest: sha256:5b3cc85e16e3058003c13b7821318369dad01dac3dbb877aac3c28182255c724 Status: Downloaded newer image for hello-world

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/

evan@panther:/etc/apt$

ubuntu 安装docker
https://fuwari.vercel.app/posts/ubuntu/ubuntu-安装docker/
作者
Asuwee
发布于
2025-01-04
许可协议
CC BY-NC-SA 4.0