1、docker 安装
1.1、安装:
sudo apt install docker.io
1.2、配置
sudo usermod -aG docker ${USER}
将当前用户加到 “docker” 用户组中,这样就不用每次执行docker指令都输入sudo了。
2、错误解决
2.1、构建镜像失败报如下错误:
dock build ./
Sending build context to Docker daemon 2.56kB
Setp 1/18 : FROM ubuntu:16.04
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方法一:
安装加速器:
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io