Docker-安装

操作系统:Ubuntu 20.04.6 LTS

更新apt

sudo apt update

删除旧版本docker

sudo apt-get remove docker docker-engine docker.io

安装docker

sudo apt install docker.io

查看docker版本

docker --version

启动docker

  • 启动docker
bash 复制代码
 sudo systemctl start docker
  • 启用docker
bash 复制代码
sudo systemctl enable docker
  • 查看docker状态
bash 复制代码
sudo systemctl status docker

停止docker

  • 禁用docker
bash 复制代码
sudo systemctl disable docker
  • 停止docker
bash 复制代码
sudo systemctl stop docker

卸载❓docker

sudo apt-get remove docker docker-engine docker.io

sudo apt-get remove docker.ce

配置docker镜像

打开配置文件

sudo vim /etc/docker/daemon.json

添加国内镜像

daemon.json添加以下配置

html 复制代码
{
  "registry-mirrors": [
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com",
    "https://ccr.ccs.tencentyun.com"
  ]
}
重启docker
html 复制代码
sudo systemctl daemon-reload
sudo systemctl restart docker
查看docker信息
html 复制代码
sudo docker info
相关推荐
Geoking.10 小时前
GitHub 多账号生存指南:从 SSH 连接到 GPG 签名全流程
运维·ssh·github
分布式存储与RustFS10 小时前
Windows原生版RustFS:无需Docker,1分钟本地对象存储环境搭建
windows·docker·容器·对象存储·minio·企业存储·rustfs
问道飞鱼10 小时前
【分布式技术】RustFS 非 Docker 部署完整指南:从单机到生产集群
分布式·docker·容器·rustfs
Frank_refuel10 小时前
Linux操作系统 - > 进程信号(中)
linux·运维·服务器
阿杜杜不是阿木木10 小时前
authentik开源身份认证与管理平台-与 Jenkins 集成(5)
运维·servlet·jenkins·authing·authentik
minji...10 小时前
Linux 多线程(二)进程虚拟地址空间&&页表&&物理地址
linux·运维·服务器
liqianpin111 小时前
Nginx WebSocket 长连接及数据容量配置
运维·websocket·nginx
IMPYLH11 小时前
Linux 的 link 命令
linux·运维·服务器·bash
csdn_aspnet11 小时前
用Anaconda驯服AI开发流,从数据预处理到模型部署,全链路环境标准化实战
人工智能·docker·ai·conda·anaconda
m0_6948455711 小时前
RevelGo搭建教程:类Rails开发体验的Go Web框架
服务器·开发语言·后端·docker·golang·开源·github