下载对应的包
https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/
执行命令
dpkg -i containerd.io_1.7.21-1_amd64.debdpkg -i docker-buildx-plugin_0.16.2-1~ubuntu.22.04~jammy_amd64.debdpkg -i docker-ce_27.2.0-1~ubuntu.22.04~jammy_amd64.debdpkg -i docker-ce-cli_27.2.0-1~ubuntu.22.04~jammy_amd64.debdpkg -i docker-ce-rootless-extras_27.2.0-1~ubuntu.22.04~jammy_amd64.debdpkg -i docker-compose-plugin_2.29.2-1~ubuntu.22.04~jammy_amd64.debdpkg -i docker-scan-plugin_0.23.0~ubuntu-jammy_amd64.deb
设置开机启动
sudo systemctl enable docker.service