Skip to content

Instantly share code, notes, and snippets.

@atroche
Created November 9, 2017 19:43
Show Gist options
  • Save atroche/e2f9621331c88723093b0c3e53dc03a7 to your computer and use it in GitHub Desktop.
Save atroche/e2f9621331c88723093b0c3e53dc03a7 to your computer and use it in GitHub Desktop.
IMG="fsof-lein-test"
REPL_PORT=6666
docker build \
-t $IMG \
-f Dockerfile.dev \
--build-arg USERID=$(id -u) \
--build-arg GROUPID=$(id -u) \
--build-arg USERNAME=$USER \
.
docker run --rm -it -u $(id -u):$(id -g) \
-e LEIN_REPL_HOST="0.0.0.0" \
-e LEIN_ROOT=1 \
-e LEIN_REPL_PORT=$REPL_PORT \
-v $(pwd)/:/backend \
-v $(pwd)/fsof-facenet/src:/python \
-v $(pwd)/fsof-facenet/data:/data \
-v /home/$USER/.m2:/home/$USER/.m2 \
-v /home/$USER/.lein:/home/$USER/.lein \
--net=host --entrypoint=/bin/bash -w /backend \
--name=$IMG \
$IMG lein test $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment