一 遇到问题:

Ubuntu从16.04升级到22.04后,发现16.04按下列方式离线安装的docker无法启动,且提供的docker-ce版本过低(docker-18.06.3-ce)

离线安装docker及常用docker命令_linux离线安装docker_最小森林的博客-CSDN博客文章目录1 离线安装docker(需要root权限)1.1 安装过程1.2 docker注册为service(需要root)1.3 改为普通用可以使用docker2 把image(镜像)在离线环境下安装2.1 有网的环境 安装docer2.2 离线下载镜像 并 打包3 常用docker命令--解决bug记录:1 离线安装docker(需要root权限)1.1 安装过程参考:《官方安装介绍》...https://blog.csdn.net/u012052268/article/details/103264596报错如下:

# systemctl status docker

……

4月 13 21:46:29 xxx dockerd[6730]: time="2023-04-13T21:46:29.332720409+08:00" level=error msg="containerd did not exit successfully" error="exit status 2" module=l

参考下列文档,原因为Docker版本过低导致,需重新安装

Docker-CE cannot run because of dockered error: "Containerd did not exist sucessfully" Exist status code 2 · Issue #377 · docker/for-linux · GitHubThis is a bug report This is a feature request I searched existing issues before opening this one Expected behavior When I run the sudo systemctl start docker then the docker will be start. Actual behavior Nothing happen. I have checked ...https://github.com/docker/for-linux/issues/377二 离线安装Docker

尝试过导入阿里云/中科大/docker官方等安装源,在使用sudo apt-get update时一直报忽略,改为离线安装。

 参考Docker官方文档:Install Docker Engine on Ubuntu | Docker DocumentationJumpstart your client-side server applications with Docker Engine on Ubuntu. This guide details prerequisites and multiple methods to install.https://docs.docker.com/engine/install/ubuntu/

安装步骤如下:

1.访问下列链接,选择对应的Ubuntu版本

Index of linux/ubuntu/dists/icon-default.png?t=N2N8https://download.docker.com/linux/ubuntu/dists/2.访问 pool/stable/ ,然后选择对应的CPU架构 (amd64armhfarm64, or s390x),如Ubuntu 22.04 amd64链接:Index of linux/ubuntu/dists/jammy/pool/stable/amd64/

3.下载下列dep文件

  • containerd.io_<version>_<arch>.deb
  • docker-ce_<version>_<arch>.deb
  • docker-ce-cli_<version>_<arch>.deb
  • docker-buildx-plugin_<version>_<arch>.deb
  • docker-compose-plugin_<version>_<arch>.deb

4.使用下列命令安装

$ sudo dpkg -i ./containerd.io_<version>_<arch>.deb \
  ./docker-ce_<version>_<arch>.deb \
  ./docker-ce-cli_<version>_<arch>.deb \
  ./docker-buildx-plugin_<version>_<arch>.deb \
  ./docker-compose-plugin_<version>_<arch>.deb

Docker daemon将自动运行

5.启动docker

$ sudo service docker start

6.设置docker自动启动

$ systemctl enable docker.service

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐