主题
安装 Docker
安装 docker
bash
curl -fsSL https://get.docker.com | sh
国内环境
bash
export DOWNLOAD_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce"
curl -fsSL https://get.docker.com | sh
为 docker 配置镜像地址
修改 docker 守护进程配置文件:
bashvi /etc/docker/daemon.json
添加以下内容:
json{ "registry-mirrors": ["https://example.com"] }
安装 docker-compose
bash
apt update
apt install docker-compose