Files
spark/docker/sparkd/dev

Sparkd Dev Container

How to create a VS Code Dev Container

  1. Make sure the Dev Containers extension is installed

  2. Make sure your Docker image is up to date

    docker pull johncolvin/bluetradingsystems:sparkd-dev
    
  3. Copy devcontainer.json from this folder to $workspaceFolder/.devcontainer/.

  4. In the VS Code Command Palette, run Dev Containers: Reopen in Container


How to update the Docker image

  1. Change the image by modifying the Dockerfile (don't tag arbitrary images on your machine and push them to our repo on Docker Hub)

  2. After modifying the Dockerfile, (re)build the image

    # Run in this dir
    docker build -t johncolvin/bluetradingsystems:sparkd-dev .
    
    • NOTE: The convention in Docker repos is to format image tags <user>/<repo>:<image_name> (hence the 'johncolvin' in the tag)
    • TODO (maybe): Push images with a common username, like 'bts'. For now, we'll just use 'johncolvin' because I happened to push the first image, and did so with a conventional tag.
  3. Commit the changes to Dockerfile in git

  4. Push the new image to Docker Hub

    docker push johncolvin/bluetradingsystems:sparkd-dev
    

    Note: 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.