Don't lock source when building in a container

The container build process can work independently of the source, so no
locking is required.
(this also fixes unprivileged container builds)
pull/34356/head
Tim Bannister 2022-06-17 12:30:10 +01:00
parent d1fe3b1cf6
commit 100aff90d7
No known key found for this signature in database
GPG Key ID: 1E76582C4F66FA48
1 changed files with 2 additions and 1 deletions

View File

@ -77,8 +77,9 @@ container-push: container-image ## Push container image for the preview of the w
container-build: module-check
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
# no build lock to allow for read-only mounts
container-serve: module-check ## Boot the development server using container.
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --environment development --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
$(CONTAINER_RUN) --cap-drop=ALL --cap-add=AUDIT_WRITE --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --environment development --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir --noBuildLock
test-examples:
scripts/test_examples.sh install