CS 70

Docker

C++ works slightly differently on every computer system—even slight changes in versions of the standard library, for example, can lead to big differences in observable behavior. To make sure that the behavior you see matches what we see when we test your code, we will use Docker to run a small virtual machine. The custom CS 70 Docker virtual machine will have all the libraries and tools you'll need to complete your assignments this semester.

Docker should already be installed on all of the lab machines, but we want you to have the option to work from your personal computer as well. In this step, you will install Docker to your own computer.

What is Docker? Why do we use it?

Docker is a system that provides “containers”—small modular virtual machines that can be connected up to provide some more complex service (e.g., you could have a web server container, a database container, and a container with a web application). Docker is often used by companies to create and deploy complex software in a way that allows them to add or remove cloud instances as needed, but it can also be used for small projects where you don't want to go to the trouble of building your own server by finding all the software you need, installing it, and configuring it.

Docker is also used to provide sane and consistent development environments so everyone working on a project can have the same basic setup as everyone else. That's how we're using it in CS 70.

The following video explains more…

Installing Docker

Although you can choose to work entirely on the CS lab machines, most students like to also be able to work on their own computers. To do so, you'll need to install Docker.

You should follow the instructions on Docker's download page for your own operating system. Each system you install on (and each version of each operating system!) will look slightly different.

Example of Installing Docker (on a Mac)

As an example, though, here's what it looked like when we installed Docker on a Mac running macOS Catalina:

Note: When you run Docker Desktop, it might encourage you to sign in to DockerHub or sign up for their services. You don't need to have a Docker account to use Docker, so you can just ignore those messages.

  • LHS Cow speaking

    If you can't get Docker to run on your computer, please reach out to the instructors and grutors right away by posting on Piazza and/or coming to grutoring or office hours. We'll do our best to help you get everything up and running.

  • RHS Cow speaking

    And please don't worry! If we're not able to get you set up, you'll still be able to complete everything you need to do for CS70; it may just mean you have to work in the lab or choose partners who have working Docker installations.

To Complete This Part of the Assignment…

You'll know you're done with this part of the assignment when you've done all of the following:

(When logged in, completion status appears here.)