Skip to content

Commit

Permalink
Docker 4
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Oct 30, 2024
1 parent 3f96325 commit 19e4dc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"

Expand Down

0 comments on commit 19e4dc0

Please sign in to comment.