Featured image of post ubunto上装docker教程

ubunto上装docker教程

ubunto上装docker教程

需要用ubuntu-22.04.5-desktop-amd64.iso创建镜像

1.更新软件包(超级慢)

1
2
sudo apt update
sudo apt upgrade

2.安装docker依赖

1
sudo apt-get install ca-certificates curl gnupg lsb-release

3.添加Docker官方GPG密钥

1
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

4.添加Docker软件源

1
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

5.安装docker

1
apt-get install docker-ce docker-ce-cli containerd.io

6.配置用户组(可选)

1
sudo usermod -aG docker $USER

7.运行docker

1
2
3
4
5
6
systemctl start docker

#安装工具
apt-get -y install apt-transport-https ca-certificates curl software-properties-common
#重启docker
service docker restart
keep trying!
使用 Hugo 构建
主题 StackJimmy 设计