jessewei

Laboratory to bluemix, a cloud solution exercise to etl scheduler

Archive for the tag “mongodb”

Pull public images

This lab work with two public images, Let’s Chat and MongoDB. First, you will need to pull them down locally before you can tag and push them to your private Bluemix registry.

  Pull the MongoDB image

  • $ docker pull mongo
    Using default tag: latest
    latest: Pulling from library/mongo
    ...
    Digest: sha256:223d59692269be18696be5c4f48e3d4117....
    Status: Downloaded newer image for mongo:latest

    Pull the Let’s Chat image

    $ docker pull sdelements/lets-chat
    Using default tag: latest
    latest: Pulling from sdelements/lets-chat
    ...
    Digest: sha256:98d1637b93a1fcc493bb00bb122602036b7....
    Status: Image is up to date for sdelements/lets-chat:latest
    

    Verify image by running locally

    Start a Mongo instance:

    $ docker run -d --name lc-mongo mongo  
    6ef19c325f6fda8f5c0277337dd797d4e31113daa7da92fbe85fe70557bfcb49
    

    Start a Let’s Chat instance:

    $ docker run -d --name lets-chat --link lc-mongo:mongo -p 8080:8080 sdelements/lets-chat
    4180a983e329947196e317563037bfd0da093ab89add16911...
    

    Access through browser

    In your browser, access http://localhost:8080.

    Stop local containers

    After verify images, these container are not required in following lab.

    Test Stop the containers:

    $ docker stop lets-chat lc-mongo
    lets-chat
    lc-mongo
    

    Delete the containers:

    $ docker rm lets-chat lc-mongo
    lets-chat
    lc-mongo
    

    Congratulations, you’ve pulled and run your first Docker-based web app. Now you will prepare the images to run them on the IBM Containers service in the cloud.

Post Navigation