live-proxmox/bin/build-iso-docker

22 lines
696 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
2025-01-22 20:40:08 +00:00
# This runs the build-iso script inside a docker container with volume mounts
# for input, output, and cached data.
set -e
IMAGE=debian:bookworm-slim
2025-01-22 20:40:08 +00:00
MYREL="$( dirname "$( realpath "${0}" )" )/.."
MYCWD="$( realpath "${MYREL}" )"
MYREV="$( git -C "${MYCWD}" rev-parse --short=8 HEAD )"
echo "${MYCWD}"
docker volume create live-build-cache || true
2025-01-22 20:40:08 +00:00
docker run --privileged --rm --workdir /app \
--env _DEBUG="${LB_DEBUG:-false}" \
--env _BUILD_REV="${BUILD_REV:-${MYREV}}" \
--volume "live-build-cache:/app/build/cache" \
2025-01-22 20:40:08 +00:00
--volume "${MYCWD}/bin:/app/bin" \
--volume "${MYCWD}/dist:/app/dist" \
--volume "${MYCWD}/live-build:/app/live-build" \
"${IMAGE}" "bin/build-iso"