A development container is a quasi-standard way to configure a development environment in a Docker container and install an agent that communicates with the IDE running on the host machine. The container can run locally or on a remote host.
This configuration solution is an option for students who are unable to configure their local environment via the existing Maven and JDK setup infrastructure and/or need to build on a remote host due to system constraints.
Install Docker on the machine running the build container, i.e. your laptop or personal computer.
We recommend that you run the build container on the host machine (a personal device); however, it is possible to run the container elsewhere, though course staff is unlikely to support alternate methods.
We recommend using IntelliJ IDEA due to its debugging capabilities and are unlikely to support other IDEs. If you prefer a different IDE, see below for instructions to run a development container via Visual Studio Code (VS Code) or GitHub Codespaces.
Note that this version is different from IntelliJ IDEA CE (Community Edition); however, both can remain installed and be used on your device simultaneously.
Development containers are currently supported only in the Ultimate edition of IntelliJ IDEA. You may obtain a free, non-commercial license here on a new or existing JetBrains account using your university address (@berkeley.edu). Note that if you have an existing JetBrains account linked to a different email address, you may need to link your personal email to your university email JetBrains account.
Install your preferred IDE. Note that course staff will only support IntelliJ IDEA Ultimate (recommended), VS Code, and GitHub Codespaces.
IntelliJ is currently configured to use the EAP (early access) version of its IDE to connect to the container by default. The EAP version is the beta version of the IDE that is both less stable and on a license which expires after 30-45 days. To disable this, go to Settings > Advanced Settings
and uncheck the box "Always use the latest backend" (see here for the article).
Start the IDE and navigate to "Dev Containers":
Create a "New Dev Container":
Use the HTTPS address of the rookiedb repository for the relevant project. For example, a student with GitHub username oski
working on Project 0 would use the repository address https://github.com/cs186-student/sp25-proj0-oski.git
:
Click "Build Container and Continue" and wait for Docker to download and build the image (this will take a few minutes).
GitHub deprecated password-based authentication in July 2020, which means that your password no longer works for command-line authentication. If asked to authenticate your GitHub account via IntelliJ, create a Personal Access Token (PAT), which you may use to set up each of your dev containers. Ensure that you save your token securely, as it cannot be accessed again via your account.
If you're creating a dev container using the SSH URL instead of the HTTPS URL, you may need to run ssh-add -k
locally to add your private SSH key to your device. You may run ssh-add -l
to see the SSH keys currently on your device.
Select and click the
to create a new dev container.
Then select Clone Repository in Container Volume
and follow prompts to clone the repository into the container.
A GitHub Codespace runs the build container in Azure, either in a browser or through the VS Code application.
Either open VS Code or the web-based editor for the repository, https://github.dev/cs186-student/sp25-projX-username
, by navigating through github.dev
instead of github.com
.
Select and click on "Create Codespace."
Please consult the documentation for latest pricing information. GitHub currently provides 120 core-hours (60 hours in the least-capable image) per month to all users for free. If you elect to run in this or another remote configuration, course staff may be unable to provide support.
CS 186 Spring 2025
Authors: Chris Douglas, Janani Sriram