I've been informed that a new build system is in place for COMP6771 from 22T3 and onwards, so these instructions may not be accurate or up-to-date anymore.
Use this link.
If you're on Linux, you may need to install the engine separately to the desktop app. Have a look for your distro in the Server section of the page above and install that first.
Launch a terminal in a folder containing the course docker image, which you can download from the config/ci
folder for each repository in the course.
# build the image, tagging it as cs6771
$ docker build -t cs6771 .
# Start the image, so that we can connect to it from VS Code
$ docker run -d -t cs6771:latest
This lets VS Code connect to the docker container and run our code in it.
4. In the bottom left corner, click the remote (><
) button, and choose to 'Attach to running container'
Choose the running container you started from the cs6771
image. VS Code will refresh.
Because the container is essentially a virtual system, it has separate storage, and won't have most of your extensions installed yet. Here's what I recommend for this course:
- A nice theme (such as SynthWave '84)
- C/C++ Extension Pack (provides syntax highlighting and build tool integration)
- C++ TestMate (allows you to run your tests easily within VS Code)
- Clangd (integration with Clang to allow for better inline error messages)
- CMake Language Support (if you ever need to edit your CMake build files)
- CodeLLDB (improved support for debugging)
- Native Debug (more debugging things - not sure if this is necessary tbh)
- Code Spell Checker (bad spelling is a bad look tbh)
Because Docker environments are a separate system, you'll need to clone your code to within your container's file system. Your SSH keys should automatically be shared with your primary OS.
From the command palette, run "Git: Clone" (NOT "Remote-Containers: Clone Repository in Container Volume..."), and paste the URL for your project repository. The project will be cloned and you can choose to open it.
Adapted from Kuroson's guide