Workspace Setup
Docker is a cross-platform tool for managing containers. You can use Docker to download and run the Workspace we have prepared for this course. The Workspace for the course is different every term; do not use one from a previous semester.
First, you will have to download and install Docker to your machine so you can access the Workspace. This can be done in one of following two ways.
- Download the Docker Desktop app from the Docker website.
- Or download both the Docker Engine and the Docker Compose
After Docker has been installed, type the following into your terminal to initalize the Docker Workspace and begin an SSH session. These commands will download our Docker Workspace from our server and boot it. The download of the Workspace will take some time, and requires an Internet connection.
Note: Docker commands will generally have to be run with sudo
, so for the commands below you might need to use sudo docker-compose up -d
.
git clone https://github.com/Berkeley-CS162/docker.git
cd docker
docker-compose up
Wait until you see the message, Docker workspace is ready!
.
After you see the message, in your terminal then use Ctrl+C
to terminate the Workspace and stop the docker-compose up
command. Finally run the following commands the same docker
directory.
docker-compose up -d
ssh vagrant@127.0.0.1 -p 16222
You will be prompted for a password to access the Workspace, just enter vagrant
as the password.
Once you are able to create an SSH session, if a code
directory doesn’t exist you will have to run the commands below to create a code
directory and to clone the student0
and group0
repos so you can get access to the staff skeleton code.
mkdir -p ~/code/group
mkdir -p ~/code/personal
git clone -q -o staff https://github.com/Berkeley-CS162/group0.git ~/code/group
git clone -q -o staff https://github.com/Berkeley-CS162/student0.git ~/code/personal
From the docker
directory that was created earlier you can enter docker-compose up -d
to start the Workspace and docker-compose down
to stop the Workspace. If you ever need it, you can use sudo rm -rf .workspace
to reset the Workspace. Lastly, to exit the SSH session you can run exit
.