corso/docker/run_dev.sh
Ashlie Martinez 548ffb02ec Simple shell script to run dev container.
* Mounts the current repo's code in the proper golang path in the
  container
* Container will be destroyed when container is exited
* User will start in the repo's code directory in the container
2022-05-03 15:44:14 -07:00

17 lines
429 B
Bash
Executable File

#! /bin/bash
# Runs the dev docker image with the current user and mounts the source code
# directory in the container at the proper go path.
# NOTE: The container is ephemeral and destroyed after it is exited (but changes
# in the repo's code directory will be available to the host).
source paths.sh
docker run \
--rm \
-it \
-v "$REPO_CODE":"$GOLANG_REPO_PATH" \
-w "$GOLANG_REPO_PATH" \
"$DEV_TAG" \
/bin/bash