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"
  ]
}
相关推荐
杨浦老苏9 小时前
开源音乐管理软件Melody
docker·群晖·多媒体
杨浦老苏11 小时前
面向npm的实时仪表板Dashly
网络·docker·群晖·导航
JunLan~12 小时前
Docker 部署 GLPI(IT 资产管理软件系统)
运维·docker·容器
特立独行的猫a14 小时前
使用 Docker(Podman) 部署 MongoDB 数据库及使用详解
数据库·docker·podman
LUCIAZZZ16 小时前
基于Docker以KRaft模式快速部署Kafka
java·运维·spring·docker·容器·kafka
特立独行的猫a19 小时前
Golang 应用的 Docker 部署方式介绍及使用详解
开发语言·docker·golang
康世行21 小时前
Windows环境下MaxKB大模型 Docker部署图文指南
windows·docker·容器
程序员石磊1 天前
学术总结Ai Agent中firecrawl(大模型爬虫平台)的超简单的docker安装方式教程
人工智能·爬虫·docker
司江龙2 天前
centos7 配置国内镜像源安装 docker
运维·docker·容器
西木Qi2 天前
Docker之Dockerfile
docker