Skip to content

Commit 19e4dc0

Browse files
committed
Docker 4
1 parent 3f96325 commit 19e4dc0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ FROM gorun AS final
5959

6060
COPY --from=build /usr/bin/hugo /usr/bin/hugo
6161

62+
VOLUME /project
63+
WORKDIR /project
64+
6265
# libc6-compat are required for extended libraries (libsass, libwebp).
6366
RUN apk add --no-cache \
6467
libc6-compat \
@@ -70,15 +73,13 @@ RUN apk add --no-cache \
7073
RUN mkdir -p /var/hugo/bin /cache && \
7174
addgroup -Sg 1000 hugo && \
7275
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
73-
chown -R hugo: /var/hugo /cache && \
76+
chown -R hugo: /var/hugo /cache /project \
7477
# For the Hugo's Git integration to work.
7578
runuser -u hugo -- git config --global --add safe.directory /project && \
7679
# See https://github.com/gohugoio/hugo/issues/9810
7780
runuser -u hugo -- git config --global core.quotepath false
7881

7982
USER hugo:hugo
80-
VOLUME /project
81-
WORKDIR /project
8283
ENV HUGO_CACHEDIR=/cache
8384
ENV PATH="/var/hugo/bin:$PATH"
8485

0 commit comments

Comments
 (0)