Skip to content

Commit 100aff9

Browse files
author
Tim Bannister
committed
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)
1 parent d1fe3b1 commit 100aff9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ container-push: container-image ## Push container image for the preview of the w
7777
container-build: module-check
7878
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify --environment development"
7979

80+
# no build lock to allow for read-only mounts
8081
container-serve: module-check ## Boot the development server using container.
81-
$(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
82+
$(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
8283

8384
test-examples:
8485
scripts/test_examples.sh install

0 commit comments

Comments
 (0)