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
This commit is contained in:
parent
9522a33ebe
commit
548ffb02ec
16
docker/run_dev.sh
Executable file
16
docker/run_dev.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#! /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
|
||||||
Loading…
x
Reference in New Issue
Block a user