source/projects/tentacles/mkdocker.sh

15 lines
332 B
Bash

#!/usr/bin/env bash
set -eoux -o pipefail
cd "$(dirname "$(realpath "$0")")"
tmpdir=$(mktemp -d)
bazel build //projects/tentacles:tentacles.zapp
zapp=$(realpath $(bazel run --run_under=echo //projects/tentacles:tentacles.zapp))
cp Dockerfile "$tmpdir/"
cp -r "$zapp" "$tmpdir/"
cd "${tmpdir}"
docker build "$@" -f Dockerfile .