This is a more accurate and appropriate name than 'spark-dev' because the image is designed to build/run Sparkd and the Spark Api Server (both of which are daemons, hence the appropriateness of the 'd' suffix). It isn't designed to build/run the front-end desktop application, Spark.
Sparkd Dev Container
How to create a Sparkd VS Code Devcontainer
-
Make sure the "Dev Containers" extension is installed in VS Code
-
Make sure your Docker image is up to date
docker pull johncolvin/bluetradingsystems:sparkd-dev -
Copy devcontainer.json from this folder to $workspaceFolder/.devcontainer/.
# This assumes the 'workspaceFolder' is the repo root. # If this is not the case, set "workspaceFolder" to the correct path # Determine repo root (only works if you are in a dir inside the repo!) repoRoot="$(git rev-parse --show-toplevel)" workspaceFolder="$repoRoot" devcontainerFolder="$repoRoot/devcontainer/" mkdir -p "$devcontainerFolder" cp "$repoRoot/devcontainer.json "$devcontainerFolder" -
In the VS Code Command Palette, run Dev Containers: Reopen in Container
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
./build.sh --image 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.
- NOTE: The convention in Docker repos is to format image tags
-
Commit the changes to Dockerfile in git
-
Push the new image to Docker Hub
docker push johncolvin/bluetradingsystems:sparkd-devNote: 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.