Run Hugo as user "hugo" in local dev container
When previewing locally using "make container-serve", run the Hugo process as user "hugo" inside that container.
This commit is contained in:
parent
a4d016e1f9
commit
bb04227f7b
|
|
@ -29,4 +29,6 @@ RUN mkdir -p /usr/local/src && \
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
|
USER hugo:hugo
|
||||||
|
|
||||||
EXPOSE 1313
|
EXPOSE 1313
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -68,7 +68,7 @@ container-build: module-check
|
||||||
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --minify
|
$(CONTAINER_RUN) $(CONTAINER_IMAGE) hugo --minify
|
||||||
|
|
||||||
container-serve: module-check
|
container-serve: module-check
|
||||||
$(CONTAINER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
|
$(CONTAINER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
|
||||||
|
|
||||||
test-examples:
|
test-examples:
|
||||||
scripts/test_examples.sh install
|
scripts/test_examples.sh install
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue