wm/in-container

15 lines
285 B
Plaintext
Raw Normal View History

2021-05-19 22:57:50 +03:00
#!/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" "$@"