自动化运维、大数据、Docker

记录使用Docker过程中踩得坑

最近在学习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
赞(0) 打赏
蜷缩的蜗牛 , 版权所有丨如未注明 , 均为原创丨 转载请注明蜷缩的蜗牛 » 记录使用Docker过程中踩得坑
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏