Skip to content

Commit

Permalink
Container (#89)
Browse files Browse the repository at this point in the history
* Container: make hugo resources dir writable for every user OpenShift throws at it

* Rewrite Dockerfile to build hugo staticly

* Allow OpenShift provided user to write cache

* Add default nginx server

* Revert "Add default nginx server"

This reverts commit 4b3b2d5.
  • Loading branch information
Siarl authored Jun 13, 2024
1 parent 73abcea commit 01740f6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@


FROM alpine:latest
FROM alpine:latest AS build

ARG HUGO_VERSION=0.68.3

Expand All @@ -15,7 +14,14 @@ RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hug
WORKDIR /usr/src/app
COPY . .
RUN git submodule init && git submodule update --remote --merge
RUN /opt/hugo

FROM nginx:mainline

WORKDIR /usr/share/nginx/html

COPY --from=build /usr/src/app/public .
RUN chmod 777 /var/cache/nginx

EXPOSE 1313
CMD [ "/opt/hugo", "server", "--bind=0.0.0.0" ]
EXPOSE 80

0 comments on commit 01740f6

Please sign in to comment.