安装后提示:
docker is already the newest version (1.5-2)
但是运行docker 命令提示找不到。
然后重新安装:
curl -sSL https://get.docker.com/ | sudo sh
提示:
The repository 'https://download.docker.com/linux/ubuntu bookworm Release' does not have a Release file.
cd /etc/apt/sources.list.d/
发现有个 archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list
rm archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list
删除后再执行,就正常了。
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:14:25 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:14:25 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0