将容器推送到bluemixregistry:405方法不允许

docker push registry.ng.bluemix.net/container_registry/[my_image_name]返回405方法不允许。

这是我的程序:

我经历了如何将容器添加到bluemix的说明: https ://console.ng.bluemix.net/catalog/add-your-own/

首先:我login:

cf login cf ic login 

bluemix指令没有提到一个端点。 我GOOGLE了端点,并连接到https://api.ng.bluemix.net一切工作。 这是输出:

 ** Retrieving client certificates from IBM Containers ** Storing client certificates in /home/compute/.ice/certs Successfully retrieved client certificates ** Checking local docker configuration Not OK Docker local daemon may not be running. You can still run IBM Containers on the cloud There are two ways to use the CLI with IBM Containers: Option 1) This option allows you to use cf ic for managing containers on IBM Containers while still using the docker CLI directly to manage your local docker host. Leverage this Cloud Foundry IBM Containers plugin without affecting the local docker environment: Example Usage: cf ic ps cf ic images Option 2) Leverage the docker CLI directly. In this shell, override local docker environment to connect to IBM Containers by setting these variables, copy and paste the following: Notice: only commands with an asterisk(*) are supported within this option export DOCKER_HOST=tcp://containers-api.ng.bluemix.net:8443 export DOCKER_CERT_PATH=/home/compute/.ice/certs export DOCKER_TLS_VERIFY=1 Example Usage: docker ps docker images</i> 

在设置了DOCKER_HOST,DOCKER_CERT_PATH和DOCKER_TLS之后,docker ps和docker image命令给了我正确的结果。

然后,我按照说明重新写入我的容器的标签:

 docker tag [my_image_name] registry.ng.bluemix.net/container_registry/[my_image_name] 

执行:

 docker push registry.ng.bluemix.net/container_registry/[my_image_name] 

给出一个错误:

 `Error response from daemon: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>405 Method Not Allowed</title> <h1>Method Not Allowed</h1> <p>The method is not allowed for the requested URL.</p>` 

我在〜/ .ice目录中find了./ibm-container脚本,它将authentication值添加到docker命令中,同样的错误。

没有证书,我被问及姓名,密码和电子邮件; 它不允许我访问我的bluemix凭据。

如前面的注释中所述,在描述中存在一些问题: – 按照@adasilva的build议检查您的docker守护进程设置,它似乎没有运行,它不会阻止您在Bluemix上标记图像,但是最好使它也在本地运行 – 根据你的描述,你正在使用一个注册名称“container_registry”,它不应该是你的(除非你成功地注册了):你可以检索它使用

 cf ic info 

然后将您的registryreplace为“container_registry”:现在您应该能够在Bluemix容器上进行标记/推送