docker使用记录

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 
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容