Install Docker Engine on Ubuntu | Docker Docs
比较方便的安装方式为通过 Apt Repo 来安装,需要三大步:
1. 预备仓库信息:
逐行执行一下命令
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
2. 安装Docker Engine
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
3. 下载 docker image
sudo docker pull ubuntu
sudo docker pull socalucr/gpgpu-sim
3. 测试文章来源:https://www.toymoban.com/news/detail-706012.html
sudo docker run --name=ubuntu_hello2 -it ubuntu:latest /bin/bash
exit 退出文章来源地址https://www.toymoban.com/news/detail-706012.html
到了这里,关于Ubuntu 22.04 安装 Docker Engine的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!