Docker安装

前言:每次安装docker都需要特地找下笔记,这边的话简单的记录下关于Docker ubuntu 安装笔记

参考文章:https://zhuanlan.zhihu.com/p/143156163

ubuntu

更新软件包索引

安装必要的依赖软件,来添加一个新的HTTPS软件源

sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

导入GPG key

使用下面的 curl 导入源仓库的 GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

添加源

将 Docker APT 软件源添加到你的系统

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

安装docker

安装最新版本的docker

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io

安装指定版本docker

sudo apt update
apt list -a docker-ce

通过在软件包名后面添加版本=来安装指定版本:

sudo apt install docker-ce=5:24.0.7-1~ubuntu.20.04~focal docker-ce-cli=5:24.0.7-1~ubuntu.20.04~focal containerd.io

查看当前运行情况

sudo systemctl status docker

锁定docker自动更新

sudo apt-mark hold docker-ce

posted @   zpchcbd  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
点击右上角即可分享
微信分享提示