1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-11-08 13:39:53 +00:00
random-stuff/it-was-inevitable/run.sh
2020-08-12 20:31:12 +01:00

25 lines
567 B
Bash
Executable File

#!/bin/sh
mode=$1
if [[ -z "$mode" ]]; then
echo 'No tag given. Changing command to ./run.bash example.'
mode=dev
fi
docker build -t benlubar/it_was_inevitable .
if [[ "$mode" == "dev" ]]; then
docker run --rm -ti \
--security-opt seccomp="$(pwd)/seccomp.json" \
-p 1556:8080 \
benlubar/it_was_inevitable
else
docker stop it_was_inevitable_ || :
docker rm -v it_was_inevitable_ || :
docker run -d --name it_was_inevitable_ \
--restart unless-stopped \
--security-opt seccomp="$(pwd)/seccomp.json" \
-p 1556:8080 \
benlubar/it_was_inevitable
fi