docker 安装ubuntu自带的docker: 1 2 3 sudo apt install docker-io docker-compose sudo systemctl start docker sudo systemctl enable docker 安装最新的docker: 1 2 3 4 5 sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs)stable" sudo apt-get -y install docker-ce sudo usermod -aG docker $USER bootfs rootfs 换源: 1 2 3 vi /etc/docker/daemon.json "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"], 重启: 1 2 sudo systemctl daemon-reload sudo systemctl restart docker 安装docker-compose: 1 2 3 4 sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod……

阅读全文