Laboratory to bluemix, a cloud solution exercise to etl scheduler

Run the web app

Run images the same way you did locally but without any worry of keeping your laptop on all day!

  • Check images are in your Bluemix hosted registry

     $ cf ic images
     REPOSITORY                                        TAG           latest                         latest              
  • Run Mongo container

  Just like locally, except this time use cf ic instead of docker to point to Bluemix.

$ cf ic run --name lc-mongo -p 27017 -m 512

  • Show the running container instances

    Wait for a state of RUNNING before you proceed:

    $ cf ic ps
    CONTAINER ID        IMAGE                                                       
    7ebf51a3-35a   ""
  • Run  Let’s Chat container

    $ cf ic run --name lets-chat --link lc-mongo:mongo -p 8080 -m 256


    Show the running container instances. Wait for a state of RUNNING before you proceed:

    $ cf ic ps
    CONTAINER ID        IMAGE                                                                
  • Expose Let’s Chat container to the public Internet

    The IBM Containers command line tool will attempt to expose your container for you if you have room left in your Public IP Address quota.

    Check which IPs are available and then bind one to your running container.

    $ cf ic ip list
    Number of allocated public IP addresses:  2
    IpAddress        ContainerId   

    If you have no available IP addresses in the response, you can request one:

    $ cf ic ip request
    Successfully requested ip 134.XXX.YYY.ZZZ


  • Bind an available IP address

    $ cf ic ip bind 134.XXX.YYY.ZZZ lets-chat
    The IP address was bound successfully

    Show running containers with bound IP information now visible:

    $ cf ic ps
    d368a598-69d   ""
    7ebf51a3-35a       ""     
  • Running app in browser

    At the IP you just bound. Remember to use port 8080!


Congratulations, you have successfully completed this IBM Containers lab!. In this lab, you learned how to tag and push local images to Bluemix, inspect pushed images for security vulnerabilities, and run hosted multi-container applications on IBM Containers.

Now you can take the hands-off approach to all your future application deployments!


If you plan to do another lab, you need to clean up your container instances. This can be done through the UI and the DELETE button on each container, or you can do this through the CLI with the cf ic rm -f [CONTAINER_NAME] command.

$ cf ic rm -f lets-chat
$ cf ic rm -f mongo

Single Post Navigation

One thought on “Run the web app

  1. Pingback: Bluemix Lab @ Windows | jessewei

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: