Skip to content

安装 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 配置镜像地址

  1. 修改 docker 守护进程配置文件:

    bash
    vi /etc/docker/daemon.json
  2. 添加以下内容:

    json
    {
      "registry-mirrors": ["https://example.com"]
    }

安装 docker-compose

bash
apt update
apt install docker-compose

基于 MIT 许可发布