Install Docker Engine on Ubuntu
参考官方文档我选择了docker desktop
gg
不要使用desktop 老实cli
最初安装desktop版本报错,后面切换CLI的直接可以了
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
根据教程一行一行安装
https://docs.docker.com/engine/install/ubuntu/#uninstall-docker-engine
安装遇到的问题 仅供参考
sudo apt-get update
Hit:1 <http://mirrors.tuna.tsinghua.edu.cn/ubuntu> jammy InRelease
Hit:2 <http://mirrors.tuna.tsinghua.edu.cn/ubuntu> jammy-updates InRelease
Ign:3 <https://download.docker.com/linux/ubuntu> jammy InRelease
Hit:4 <http://mirrors.tuna.tsinghua.edu.cn/ubuntu> jammy-backports InRelease
Hit:5 <https://packages.microsoft.com/repos/code> stable InRelease
Hit:6 <http://security.ubuntu.com/ubuntu> jammy-security InRelease
Ign:3 <https://download.docker.com/linux/ubuntu> jammy InRelease
Ign:3 <https://download.docker.com/linux/ubuntu> jammy InRelease
Err:3 <https://download.docker.com/linux/ubuntu> jammy InRelease
Could not handshake: Error in the pull function. [IP: 2600:9000:215a:8c00:3:db06:4200:93a1 443]
Reading package lists... Done
W: Failed to fetch <https://download.docker.com/linux/ubuntu/dists/jammy/InRelease> Could not handshake: Error in the pull function. [IP: 2600:9000:215a:8c00:3:db06:4200:93a1 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
xulabwtu@wtu4090:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'
E: Unable to locate package docker-buildx-plugin
E: Unable to locate package docker-compose-plugin
**安装步骤一直报错 我给命令行代理关掉了 成功了**
xulabwtu@wtu4090:~$ sudo docker pull hello-world:nanoserver-ltsc2022
Error response from daemon: Get "<https://registry-1.docker.io/v2/>": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
xulabwtu@wtu4090:~$
虽然挂了proxy_on 但是看起来并没有代理?
解决方案
~~https://github.com/todaygood/container-lab/issues/10~~
写得不好 修改了原始配置 参考下面的page