mongodb docker bluemix

We are going to see how easy is to deploy a MongoDB docker container in Bluemix

First we need to login in the Cloud Foundry CLI pointing to our Bluemix Endpoint

cf login

Now, we will execute the IBM Containers plugin for Cloud Foundry

cf ic login

Now pull the latest mongo image to your computer

docker pull mongo

Tag your image in your private registry workspace from IBM Container

docker tag mongo

Push the image

docker push

And now you can select the image in the containers catalog from Bluemix or you can use the next command to run it

cf ic run --name mongo_container

Remember that in order to connect to your mongodb instance you need to assign a public IP to your container