Add support for no-cache option in Docker build scripts. Update build-docker.ps1 and build-docker.sh to include --no-cache flag when PISCAL_BUILD_NO_CACHE environment variable is set, improving build flexibility.

This commit is contained in:
2026-04-04 21:37:02 -04:00
parent e6e95ad31c
commit 446b4e4e36
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -26,6 +26,9 @@ $BuildArgs = @("-t", "piscal:$Version", "-t", "piscal:latest", "-t", "piscal:dev
if ($env:PISCAL_SSH_PASSWORD) {
$BuildArgs += "--build-arg", "SSH_PASSWORD=$($env:PISCAL_SSH_PASSWORD)"
}
if ($env:PISCAL_BUILD_NO_CACHE) {
$BuildArgs += "--no-cache"
}
docker build @BuildArgs .
if ($LASTEXITCODE -eq 0) {
+1
View File
@@ -24,6 +24,7 @@ BUILD_ARGS=(-t "piscal:${VERSION}" -t piscal:latest -t piscal:dev)
if [ -n "${PISCAL_SSH_PASSWORD:-}" ]; then
BUILD_ARGS+=(--build-arg "SSH_PASSWORD=${PISCAL_SSH_PASSWORD}")
fi
[ -n "${PISCAL_BUILD_NO_CACHE:-}" ] && BUILD_ARGS+=(--no-cache)
docker build "${BUILD_ARGS[@]}" .