Skip to content

Commit

Permalink
run docker only if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
abretaud committed Nov 6, 2019
1 parent 9da9bc3 commit 2548c79
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion bootstrap_apollo.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
#!/bin/bash

SHOULD_LAUNCH_DOCKER=1
for arg in "$@"
do
case $arg in
--nodocker)
SHOULD_LAUNCH_DOCKER=0
shift
;;
*)
shift
;;
esac
done

export GALAXY_SHARED_DIR=`pwd`/apollo_shared_dir
mkdir -p "$GALAXY_SHARED_DIR"

docker run --memory=4g -d -it -p 8888:8080 -v `pwd`/apollo_shared_dir/:`pwd`/apollo_shared_dir/ quay.io/gmod/apollo:latest
if ! [[ $SHOULD_LAUNCH_DOCKER -eq 0 ]]; then
docker run --memory=4g -d -it -p 8888:8080 -v `pwd`/apollo_shared_dir/:`pwd`/apollo_shared_dir/ quay.io/gmod/apollo:latest
fi

echo "[BOOTSTRAP] Waiting while Apollo starts up..."
# Wait for apollo to be online
Expand Down

0 comments on commit 2548c79

Please sign in to comment.