Those who are our regular readers, they learned to use Docker on local computer. Now, how to run Docker, containers on IBM Bluemix? IBM Bluemix is a Platform as a Service (PaaS). We normally to use Bluemix we use Cloud Foundry command line tools and tools for Bluemix (like we have shown in the example of installing WordPress on Bluemix). In this guide we have provided clear instructions, commands to setup the command line tools on Mac for Docker.
How To Run Docker, Containers On IBM Bluemix
The difficulty exists as Bluemix has deprecated single and scalable containers and default service is now Kubernetes clusters. There are users who are not used with Kubernetes. With your existing setup for Bluemix (like our that linked guide to install WordPress on Bluemix), and needed setup to run Docker on local Mac (like our guides on Docker) run these commands :
1 2 3 4 | cf -v bx -v bx login -a https://api.ng.bluemix.net bx plugin list |
Install some plugins running these commands :
---
1 2 3 4 | bx plugin install IBM-Containers -r Bluemix bx plugin install container-registry -r Bluemix # current bx plugin list |
IBM has separate own IBM Bluemix Container Registry like Docker has. Obviously that has :
1 | https://console.bluemix.net/docs/cli/plugins/registry/index.html |
Now, install the Kubernetes CLI (not written in this guide, look at official website of Kubernetes). After that, you’ll be able to run kubectl
command.
Run these two commands one by one :
1 2 | bluemix ic init bx ic ps -a |
The above commands will verify whether you have installed the needed plugins properly. Install Docker compose :
1 | sudo pip install docker-compose --upgrade |
Now read this guide to cross-check whether everything is fine :
1 | https://console.bluemix.net/docs/containers/cs_cli_install.html |
Notice that :
1 2 3 4 | bx login cf login bluemix login bx cr login |
Separately works (which is sometime disturbing and confusing to the new users). Basically we can specify the Bluemix organization and space we want to create your Kubernetes cluster :
1 | bx target --cf |
Update once and login :
1 2 | bx plugin update container-service -r Bluemix bx cr login |
Now you can run :
1 2 3 4 | docker pull hello-world:latest docker tag hello-world:latest registry.<region>.bluemix.net/your_namespace/hw_repo:1 docker push registry.<region>.bluemix.net/<your_namespace>/hw_repo:1 bx cr image-list |