Loading Dockerfile.linux.amd64 +17 −11 Original line number Diff line number Diff line FROM cr.simoncor.net/siempie/hugo-sws:latest # build stage FROM cr.simoncor.net/siempie/hugo:latest AS builder # copy site # copy site content to /src COPY . /src # clone template RUN set -e \ && git clone https://github.com/gesquive/slate /src/themes/slate \ && /usr/local/bin/hugo --source=/src/ \ && cp -r /src/public /site/ \ && rm -rf /src # clone the slate theme RUN git clone https://github.com/gesquive/slate /src/themes/slate # expose 3000 # build the hugo site RUN hugo --source=/src/ # production stage FROM docker.io/joseluisq/static-web-server:2.38.0 # copy built site from builder stage COPY --from=builder /src/public /site/ # use port 3000 EXPOSE 3000 # start static-web-server ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=3000", "--root=/site/"] # run static web server ENTRYPOINT ["sws", "--host=0.0.0.0", "--log-level=info", "--port=3000", "--root=/site/"] Loading
Dockerfile.linux.amd64 +17 −11 Original line number Diff line number Diff line FROM cr.simoncor.net/siempie/hugo-sws:latest # build stage FROM cr.simoncor.net/siempie/hugo:latest AS builder # copy site # copy site content to /src COPY . /src # clone template RUN set -e \ && git clone https://github.com/gesquive/slate /src/themes/slate \ && /usr/local/bin/hugo --source=/src/ \ && cp -r /src/public /site/ \ && rm -rf /src # clone the slate theme RUN git clone https://github.com/gesquive/slate /src/themes/slate # expose 3000 # build the hugo site RUN hugo --source=/src/ # production stage FROM docker.io/joseluisq/static-web-server:2.38.0 # copy built site from builder stage COPY --from=builder /src/public /site/ # use port 3000 EXPOSE 3000 # start static-web-server ENTRYPOINT ["/usr/local/bin/sws", "--host=0.0.0.0", "--log-level=info", "--port=3000", "--root=/site/"] # run static web server ENTRYPOINT ["sws", "--host=0.0.0.0", "--log-level=info", "--port=3000", "--root=/site/"]