JavascriptSubtitlesOctopus/run-buildah-build.sh
Oneric ce08cd050f Add run-buildah-build.sh script
And expand options for the docker script.
`buildah run` requires a command to be specified;
it is more like the RUN in a Dockerfile and not
starting the containers entrypoint as `docker run`,
but it allows us to not require a specific runtime.
2021-09-18 18:02:36 +00:00

19 lines
338 B
Bash
Executable File

#! /bin/sh
set -e
cd "$(dirname "$0")"
. ./run-common.sh
if [ "$#" -eq 0 ] ; then
cmd="make"
else
cmd=""
fi
if [ "$FAST" -eq 0 ] ; then
buildah bud -t "$IMAGE" .
buildah rm "$CONTAINER" >/dev/null 2>&1 || :
buildah from --name "$CONTAINER" "$IMAGE":latest
fi
buildah run -t -v "${PWD}":/code "$CONTAINER" $cmd "$@"