`
dbp_cn
  • 浏览: 88527 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

docker 常见坑

 
阅读更多

 

1. denied: requested access to the resource is denied

当我push下面的镜像到docker hub 的时候,出现了以上的错误

REPOSITORY    TAG    IMAGE ID           CREATED        SIZE
ubuntu            12.04  5b117edd0b76    4 weeks ago    104MB

寻找到一下解释:

You need to include the namespace for Docker Hub to associate it with your account.
The namespace is the same as your Docker Hub account name.
You need to rename the image to YOUR_DOCKERHUB_NAME/docker-whale.
So, this means you have to tag your image before pushing:

docker tag firstimage YOUR_DOCKERHUB_NAME/firstimage

 

    出现这种错误,主要是因为REPOSITORY 的前缀和 dockerhub的账号不一致

docker tag <IMAGE_ID> billdan/ubuntu:12.04
或者: docker tag ubuntu:12.04 billdan/ubuntu:12.04

 按以上方式添加一个tag就行了。

 

2.kubernetes创建yaml,pod服务一直处于 ContainerCreating状态的原因查找与解决

http://blog.csdn.net/learner198461/article/details/78036854

 

3. 在ubuntu机器上安装最新的docker-compose(machine),结果出现如下异常:

Failed to connect to github-production-release-asset-2e65be.s3.amazonaws.com port 443: 连接超时

该地址(github-production-release-asset-2e65be.s3.amazonaws.com) 需要的一些下载的访问被 国内屏蔽了,需要设置下hosts文件,使用香港的服务器。

解决办法:

在hosts文件中,加入这一行:

219.76.4.4 github-cloud.s3.amazonaws.com

 

4.docker 配置remote api运行远程调用(版本1.13) ,服务器cent os:

修改 文件: /etc/sysconfig/docker OPTIONS 后面加入属性:

 

 -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 

然后重启 服务:

 

sudo systemctl --system daemon-reload

 验证时候,找一个远程主机连接docker API :

sudo docker -H IP:2375 info

 可能出现的错误: no host to route

这是因为api 被调用docker服务防火墙未关闭,关闭防火墙之后再试试:

 systemctl stop firewalld.service

 

 5. ubuntu- 普通用户加入docker分组后,依然提示dial unix /var/run/docker.sock权限不够:

 

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.30/info: dial unix /var/run/docker.sock: connect: permission denied 

 

 

sudo groupadd docker
sudo usermod -aG docker $USER

 

则可以尝试执行以下命令:

sudo chmod a+rw /var/run/docker.sock

 

 6.k8s centos 安装过程的坑:

https://blog.csdn.net/d7185540/article/details/80868816

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics