Sign inSign up

harveymudd/cs70-student

By harveymudd

•Updated 11 months ago

Image
1

10K+

harveymudd/cs70-student repository overview

⁠Github Clasroom:

In order to get going, you will first need to generate your HW-repo from GitHub Classroom by following a link:

For example, the link we have for HW is here: https://classroom.github.com/g/22EgwhsN⁠

When I did it, it asked me to create a "team".

I created a team called "Just-Lucas" for myself, and then GH classroom made me a copy of the HW-01 repo from our main repo and named it Homework-01-Just-Lucas.

It would be good to figure out how a team of two can be made where each person has access to the repo.

⁠Clone the repository to your machine and edit:

The previous step created a repo on github for you by copying the starter code from the CS70 repo.

Our goal is to get that code onto your machine and be able to edit it.

One way to do this is to use VS Code. Install and open VS Code. Then in VS Code, open a terminal or console.

Now, to get that code onto your machine you will need to go to the repository on the GitHub website copy the url, and in the VS Code terminal run

> git clone <github repo url>

You will probably be asked for some credentials.

After that works, you should be able to access and edit the cloned files from within VS Code (or any other editor, or in your file navigator, or whatever)

⁠Docker:

Now that we have the code, we want to be able to edit and save it in VS Code but compile and run it inside Docker, which has all of the necessary C++ libraries, data files, etc.

From the VS Code command line, you should be able to

  1. Login to docker.(This is only necessary for us as CS70 docker image devs. Students will not need to login once the docker image becomes public.)
> docker login
Username: ...
Password: ...
  1. download the image
> docker pull lucasbang/cs70-student
  1. Run the image, mounting /home/student/cs70/ from the docker container to your current working directory
> docker run -v $(pwd):/home/student/cs70/ -it lucasbang/cs70-student /bin/zsh
  1. Compile and run code inside of docker
DOCKER > clang++ palindrome.cpp -o palindrome
DOCKER > ./palindrome
  1. Edit the palindrome code in VS Code, compile and run again in Docker.

  2. Exit docker

DOCKER > exit
  1. Commit and push your changes to your github repo:
> git add palindrome.cpp
> git commit -m "edited palindrome."
> git push

Tag summary

Content type

Image

Digest

sha256:9a734c65e…

Size

1.2 GB

Last updated

11 months ago

docker pull harveymudd/cs70-student:fall2025