add Dockerfile for easier build

This commit is contained in:
Motiejus Jakštys
2021-05-09 16:51:54 +03:00
parent 1d233d38af
commit c1196dc45b
2 changed files with 23 additions and 0 deletions

14
IV/in-container Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
NAME=wm-mj-build
if [[ -z "$(docker images -q --filter "reference=$NAME")" ]]; then
docker build -t "$NAME" - < Dockerfile
fi
exec docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${PWD}:/x \
-w /x \
"$NAME" "$@"