博文

目前显示的是 三月, 2021的博文

Docker教程,必备知识点整理

  安装脚本 一键安装脚本!Linux系统都支持! 1 curl - sSL https : //get.docker.com/ | sh 国内阿里云镜像 1 curl - fsSL https : //get.docker.com | bash -s docker --mirror Aliyun Azure源(中国区azure) 1 curl - fsSL https : //get.docker.com | bash -s docker --mirror AzureChinaCloud   启动服务 启动Docker 1 systemctl start docker 开机启动 1 systemctl enable docker   国内镜像 为了加速下载镜像文件,国内服务器可以指定国内的镜像! 阿里云:https://registry.cn-hangzhou.aliyuncs.com/ 华为云:https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com/ Docker中国:https://registry.docker-cn.com 网易:http://hub-mirror.c.163.com 中科大:https://docker.mirrors.ustc.edu.cn   写入配置文件 重启服务 1 2 3 4 5 6 7 8 sudo mkdir - p / etc / docker sudo tee / etc / docker / daemon . json << - 'EOF' {    "registry-mirrors" : [ "https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com/" ] } EOF sudo systemctl daemon - reload sudo systemctl restart docker   迁移目录 主要是为了不让Docker镜像,容器占用系统盘的容量! 如果就一块盘或者系统盘容量大,这部分内容可忽略! 1 2 3 4 5 6 7 8 9 10 11 12 13 1