mrfrys-node-server/scripts/runDocker.sh
2021-08-01 13:52:53 +02:00

19 lines
550 B
Bash
Executable file

#!/bin/bash
if [ "$1" == "build" ]; then
docker build . -t qminer/mrfrys-node-server
exit
elif [ "$1" == "run" ]; then
# --entrypoint bash \
scripts/setup.sh
docker run -it \
-p 8080:80 \
--mount src="$(pwd)/stats",target=/server/stats,type=bind \
--mount src="$(pwd)/data",target=/server/data,type=bind \
--mount src="$(pwd)/publicDirs",target=/server/publicDirs,type=bind \
qminer/mrfrys-node-server
elif [ "$1" == "bash" ]; then
docker exec -it "<container id>" /bin/bash
else
echo 'params: "build" or "run"'
fi