* Upgrade dotnet 7 -> 8 * Upgrade clang (13, 15) -> 17 * Upgrade gcc (11, 12) -> 13 * Remove kitware release candidate apt repo (probably shouldn't have been added in the first place). * Install gdb for c++ debugging (VS Code debugger depends on this) * Use explicit release ubuntu:22.04 (not 'latest'). We don't want the distro to automatically upgrade one day, when 'latest' suddenly points to a new release. Upgrades like that need to be done deliberately. * Use more granular RUN cmds to reduce rebuild times. When a Dockerfile is built, the RUN cmds are executed in the order in which they were written (duh!). Checkpoints called "cache layers" are saved for each RUN cmd, so if the Dockerfile is later modified, the image can be rebuilt from the most recent layer that wasn't invalidated by the modifications.
Sparkd Dev Container
How to create a VS Code Dev Container
-
Make sure the Dev Containers extension is installed
-
Make sure your Docker image is up to date
docker pull bluetradingsystems/sparkd-dev:latest -
Copy devcontainer.json from this folder to $workspaceFolder/.devcontainer/.
-
In the VS Code Command Palette, run Dev Containers: Reopen in Container
How to create a Sparkd Container in the terminal (without VS Code)
- Make sure your Docker image is up to date
docker pull bluetradingsystems/sparkd-dev:latest - Start the container
# Replace <cont_name> with a name for the container. The container's # "$HOME" dir will be mounted to "$HOME/.sparkd-dev/mounts/<cont_name> on # the host ./start_docker.sh --container <cont_name> --mount-existing- Replace <cont_name> with a name for the container
- The container's
$HOMEdir will be mounted to$HOME/.sparkd-dev/mounts<cont_name>on the host - Run:
./start_docker.sh --helpto see additional options
- (Optional) Attach VS Code to the running container.
Run Dev Containers: Attach to Running Container from the command palette, then select your container in the dropdown
How to update the Docker image
-
Change the image by modifying the Dockerfile (don't tag arbitrary images on your machine and push them to our repo on Docker Hub)
-
After modifying the Dockerfile, (re)build the image
# Run in this dir docker build -t bluetradingsystems/sparkd-dev:latest .Note: Your docker login must have write permissions to push to the sparkd-dev repository
-
Commit the changes to Dockerfile in git
-
Push the new image to Docker Hub
docker push bluetradingsystems/sparkd-dev:latestNote: The image doesn't have to be on Docker Hub, we can simply build it from scratch on our local machines (with the Dockerfile). However, this takes time. It is significantly quicker to download a prebuilt image, so we store it on a remote repository to save time when setting up a new dev machine.