Docker| Docker compose
- ubuntu下安装【Ubuntu】docker engine,非桌面版本
- 官网链接: Install Docker Engine on Ubuntu | Docker Documentation
# 添加docker的apt库
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
# 安装docker的官方key
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
# 设置仓库
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
# 更新apt库,利用apt库安装docker
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# 测试是否安装好,可省略
sudo docker run hello-world
-
安装 【Ubuntu】docker compose
$ sudo apt-get update
$ sudo apt-get install docker-compose-plugin
#测试安装版本
$ docker compose version
#Docker Compose version vN.N.N
#其中vN.N.N是版本号
标签:engine,compose,get,sudo,apt,Docker,docker
From: https://www.cnblogs.com/auspice/p/17528943.html