I am running through the directions to work with docker containers and Bluemix using the ic plugin. When I run the command:
cf ic login
I receive the message:
Your system was authenticated with the IBM Containers API, however the local Docker daemon is not reachable to authenticate it with the IBM Containers registry. You can still run IBM Containers on the cloud but will not be able to push or pull images.
If I work with docker locally without running the cf ic login, all seems to be fine.
Following the cf ic login, if I run any docker commands such as:
docker tag ibmjstart/bluemix-wordpress registry.ng.bluemix.net/myNamespace/wordpress
the commands fail with the message:
Error response from daemon: 405 Method Not Allowed
Method Not Allowed
The method is not allowed for the requested URL.
Any guidance on things to check is greatly appreciated. Thanks!
this is because cf ic output is suggesting you that you have to switch docker from your local engine to Bluemix one before using docker client to work remotely. As suggested from the output of cf ic login, you simply have to set the following env vars to remote Bluemix references, exactly as suggested DOCKER_TLS_VERIFY DOCKER_HOST DOCKER_CERT_PATH
Then if you wish to switch back simply set value to their previous values (eventually print them and save before switching)
The answer that V.Bontempi provided was extremely helpful and it may just have been me not quite grasping what he was stating, but to clarify it was actually setting the env variables to point exclusively to Bluemix which was causing the issue. When you set the env variables
This tells docker to work exclusively with Bluemix versus the local instance. So, if I set the env variables, after doing this when I attempted to work with a local image and tag it as per the tutorial found here:
WordPress on Bluemix Containers
and I tried running the command:
using my namespace, the command would fail with a 405 error. On the other hand, if I run the following sequence of commands without the export, everything works as expected:
The support team provided me with the following explanation:
1) Install and configure docker to work locally This is the first think you need to do, so you can create your images locally before pushing to IBM Containers in Bluemix. For this step to work you have to configure docker environment variables. To do this you can run the following command: eval "$(docker-machine env default)"
This will set the environment variables for you local docker. Docker will not work if you not set this variables. After setting this you can try basic docker commands, like:
You will notice that these commands would not work if you have not set the environment variables.
2) Log in to Bluemix and IBM Containers Now that docker is installed and configured you can log in with the following commands:
Thanks to the Bluemix support team for the help!