docker安装和换源

安装:

https://www.runoob.com/docker/ubuntu-docker-install.html

bash 复制代码
sudo apt-get remove docker docker-engine docker.io containerd runc



sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common


curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

apt-cache madison docker-ce

sudo apt-get install docker-ce=VERSION_STRING docker-ce-cli=VERSION_STRING containerd.io


sudo docker run hello-world

换源:

注意,因为初始的域名不可访问,所有代理没有效果,只能换源!

bash 复制代码
{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "registry-mirrors": [
    "https://docker.hpcloud.cloud",
    "https://docker.m.daocloud.io",
    "https://docker.unsee.tech",
    "https://docker.1panel.live",
    "http://mirrors.ustc.edu.cn",
    "https://docker.chenby.cn",
    "http://mirror.azure.cn",
    "https://dockerpull.org",
    "https://dockerhub.icu",
    "https://hub.rat.dev"
  ]
}
相关推荐
NorthCastle8 小时前
Docker 网络-单机版
网络·docker·docker网络基础概念·docker网络基础命令
漫步企鹅11 小时前
【VS Code - Qt】如何基于Docker Linux配置Windows10下的VS Code,开发调试ARM 版的Qt应用程序?
linux·qt·docker·arm·vs code·开发调试
杨浦老苏13 小时前
简单的身份验证中间件Tinyauth
docker·群晖·sso
z涛.13 小时前
Docker容器
运维·docker·容器
AI风老师14 小时前
7、docker |其余命令
linux·ubuntu·docker
long31616 小时前
使用docker compose 部署dockge
运维·docker·容器
豆豆の爸爸21 小时前
苹果容器Apple container是做什么用的?
docker·容器
koboides1 天前
04-Docker的架构介绍及部署实战
docker·容器·架构
MANONGMN1 天前
【走进Docker的世界】Docker的发展历程
运维·docker·容器
MANONGMN1 天前
【走进Docker的世界】深入理解Docker网络:从模式选择到实战配置
网络·docker