• 欢迎访问蜷缩的蜗牛博客 蜷缩的蜗牛
  • 微信搜索: 蜷缩的蜗牛 | 联系站长 kbsonlong@qq.com
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

记录使用Docker过程中踩得坑

Along 蜷缩的蜗牛 2年前 (2017-04-07) 127次浏览 已收录 0个评论

最近在学习 docker,在使用过程中总会遇上各种坑,在此记录以便后期查阅,持续更新…..

 

1、centos6.5 启动失败,提示 docker 已死,但 pid 文件仍存

查看/var/log/docker 日志发现提示如下错误

docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference

 

yum install device-mapper-libs

 

 

2、docker 在 pull 的时候默认走 https; 由于 registry 主机没有配置 ssl,客户端 pull 的时候出现如下错误

# docker pull 192.168.62.200:5000/saltops
Error response from daemon: invalid registry endpoint https://192.168.62.200:5000/v0/: unable to ping registry endpoint https://192.168.62.200:5000/v0/
v2 ping attempt failed with error: Get https://192.168.62.200:5000/v2/: tls: oversized record received with length 20527
 v1 ping attempt failed with error: Get https://192.168.62.200:5000/v1/_ping: tls: oversized record received with length 20527. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.62.200:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/192.168.62.200:5000/ca.crt

修改客户端配置文件,添加–insecure-registry 192.168.62.200:5000

Centos6
# cat /etc/sysconfig/docker |grep other_args
other_args="--registry-mirror=https://so9gt83b.mirror.aliyuncs.com --insecure-registry 192.168.62.200:5000"
Centos7

# cat /etc/systemd/system/multi-user.target.wants/docker.service | grep ExecStart
ExecStart=/usr/bin/dockerd --registry-mirror=https://so9gt83b.mirror.aliyuncs.com   --insecure-registry=192.168.62.200:5000

蜷缩的蜗牛 , 版权所有丨如未注明 , 均为原创丨 转载请注明记录使用 Docker 过程中踩得坑
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!