CS4740 Cloud Computing

Neal Magee, Ph.D.
Solution Architect, Research Computing
University of Virginia, Fall 2020

Lab: Microservices / Docker 101

Containerized microservices are portable, efficient, and disposable, and contain code and any dependencies in a single package. Containerized microservices typically run a single process, rather than an entire stack within the same computing environment. This allows portions of your application to be easily replaced or scaled as needed.

Docker is the most popular, and one of the easiest, ways to work with containers. This lab introduces the basics of creating, using, and managing Docker containers.

This lab is unique in that you will be running Docker containers as a way of presenting and working through the lab itself. Setup instructions are below.



  1. Open Play with Docker using the button below.

  2. Click Login (and log into Docker) or Start.
  3. You have now initiated a free 4-hour session. Click "ADD A NEW INSTANCE". Wait a few seconds for a terminal to appear. If your cursor does not appear automatically, press your RETURN button a time or two. Your browser window should look something like this:

    Docker Play Session
  4. To initiate the Docker 101 training modules, run this command in the terminal:

    docker run -dp 80:80 docker/getting-started:pwd
    
  5. This command launches the getting-started container, a portable training application.
  6. To access the training modules, click on the hyperlinked "80" that appears near the top of the page:

    Docker Play - Port 80
  7. The Docker 101 training pages should now appear in a new browser tab:

    Docker 101
  8. Carefully follow the instructions for the ten modules of the training.
  9. When you have finished the training, click the red CLOSE SESSSION button. You may repeat this lab as often as you like.
Hungry for more Docker labs? Try Docker Classroom.