Reputation: 101
docker push registry.ng.bluemix.net/container_registry/[my_image_name] Returns 405 Method Not Allowed.
Here is my procedure:
I went through the instruction on how to add a container to bluemix: https://console.ng.bluemix.net/catalog/add-your-own/
First: I logged in with:
cf login
cf ic login
The bluemix instruction did not mention an endpoint. I googled the endpoint and connected to https://api.ng.bluemix.net Everything worked. That is the output:
** 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>
After setting the DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS the docker ps and docker image command gives me correct results.
Then, I re-write the tag of my container according to the instructions:
docker tag [my_image_name] registry.ng.bluemix.net/container_registry/[my_image_name]
Executing:
docker push registry.ng.bluemix.net/container_registry/[my_image_name]
Gives an error:
`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>`
I found the ./ibm-container script in the ~/.ice directory, which adds the authentication values to the docker command, the same error.
Without the certificate, I am asked name, password and email; It does not give me access with my bluemix credentials.
Upvotes: 0
Views: 1163
Reputation: 1562
as described in previous comments there are you problems in your description: - check your docker daemon settings as suggested by @adasilva, it seems not running, it won't prevent you tagging images on Bluemix, but it would be better for you to make it run locally too - according to your description you are using a registry name "container_registry" and it shouldn't be your one (unless you successfully registered it): you can retrieve it using
cf ic info
Then substitute your registry to "container_registry": now you should be able to tag/push on Bluemix containers
Upvotes: 1