ubuntu20.04 安装 Docker


sudo groupadd docker

sudo usermod -a -G docker 当前用户名称

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] Index of linux/ubuntu/ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get -update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

你可能感兴趣的:(docker,容器)