Added docker stuff

This commit is contained in:
mrfry 2021-08-01 13:18:35 +02:00
parent cc19b5424b
commit 6ea1ec3958
4 changed files with 60 additions and 10 deletions

18
scripts/runDocker.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
if [ "$1" == "build" ]; then
docker build . -t qminer/mrfrys-node-server
exit
elif [ "$1" == "run" ]; then
# --entrypoint bash \
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