文章目录
Docker的基础概念与入门
docker与docker镜像的理解
- 可以将docker镜像理解为一个类,那么一个docker就位一个docker镜像的实例。
虚拟机下[ubantu系统下]Docker的安装
- docker的下载地址:https://docs.docker.com/engine/install/ubuntu/
- 如果之前安装过docker,需要把之前的给卸载干净:
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
- 安装docker的apt依赖
# 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/docke