使用中国大陆镜像源安装最新版的 docker Deamon

在一个智算项目交付过程中,出现了新建集群中的全部 docker server V19 进程消失、仅剩 docker server 的 unix-socket 存活的现象。

为了验证是否是BD产品研发提供的产品deploy语句缺陷,需要在本地环境上部署一个简单的 docker Deamon 环境。尴尬的是,docker的 official 仓库地址解析不了了。。。

以下是一个借助 中国大陆 repository 安装最新版本 docker Deamon 的 shell 语句块:

基于Ubuntu 24.04 LTS 发行版:

apt update -y
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do apt remove -y --purge $pkg; done
apt install -y ca-certificates curl wget gnupg
install -m 0755 -d /etc/apt/keyrings
wget http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg -O /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(cat /etc/os-release | awk -F "=" '/VERSION_CODENAME/ {print $2}') stable" | tee /etc/apt/sources.list.d/docker.list
apt update -y
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl is-enabled docker && systemctl is-active docker && docker info && systemctl status docker

【最新的 docker server 默认已经把 Control group 驱动 调整为 systemd 了】

配置 docker-image 的 代理加速   /etc/docker/daemon.json 
{
  "registry-mirrors": [
                       "https://9oe2llyt.mirror.aliyuncs.com",
                       "https://dockerpull.com"
                                               ]
}

相关推荐

  1. 【GitLab】Ubuntu使用宝塔安装GitLab最新社区

    2024-07-11 03:56:03       39 阅读
  2. 使用国内镜像安装 Golang 包:

    2024-07-11 03:56:03       54 阅读
  3. 使用镜像在 Jupyter Notebook中直接安装JupyterLab

    2024-07-11 03:56:03       54 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-11 03:56:03       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-11 03:56:03       71 阅读
  3. 在Django里面运行非项目文件

    2024-07-11 03:56:03       58 阅读
  4. Python语言-面向对象

    2024-07-11 03:56:03       69 阅读

热门阅读

  1. 容器之docker compose

    2024-07-11 03:56:03       22 阅读
  2. 55、定义浅层神经网络架构和算法(matlab)

    2024-07-11 03:56:03       19 阅读
  3. FastApi+WebSocket 解析

    2024-07-11 03:56:03       19 阅读
  4. redis的部署及基本使用

    2024-07-11 03:56:03       17 阅读
  5. QT入门详解含源码)

    2024-07-11 03:56:03       26 阅读
  6. 前端程序员常用快捷键

    2024-07-11 03:56:03       24 阅读