From 19e4dc0bf1a67ba1abcda183dacac4cade4a9c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 30 Oct 2024 12:41:32 +0100 Subject: [PATCH] Docker 4 --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d1bf78c42d..6cb41985594 100755 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,9 @@ FROM gorun AS final COPY --from=build /usr/bin/hugo /usr/bin/hugo +VOLUME /project +WORKDIR /project + # libc6-compat are required for extended libraries (libsass, libwebp). RUN apk add --no-cache \ libc6-compat \ @@ -70,15 +73,13 @@ RUN apk add --no-cache \ RUN mkdir -p /var/hugo/bin /cache && \ addgroup -Sg 1000 hugo && \ adduser -Sg hugo -u 1000 -h /var/hugo hugo && \ - chown -R hugo: /var/hugo /cache && \ + chown -R hugo: /var/hugo /cache /project \ # For the Hugo's Git integration to work. runuser -u hugo -- git config --global --add safe.directory /project && \ # See https://github.com/gohugoio/hugo/issues/9810 runuser -u hugo -- git config --global core.quotepath false USER hugo:hugo -VOLUME /project -WORKDIR /project ENV HUGO_CACHEDIR=/cache ENV PATH="/var/hugo/bin:$PATH"