24 lines
589 B
Docker
24 lines
589 B
Docker
# STEP 1: Build the website's files
|
|
FROM alpine:latest AS build-website
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . /src/
|
|
|
|
# Get hugo -- using the edge branch to get latest version
|
|
RUN sed -i -e 's/v[[:digit:]]\..*\//edge\//g' /etc/apk/repositories
|
|
RUN apk update && apk upgrade && \
|
|
apk add --no-cache hugo
|
|
|
|
RUN hugo --minify
|
|
|
|
# STEP 2: Add static files to webserver image
|
|
FROM docker.simplesystems.tech/simplesystems/webserver:latest
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy over static website files
|
|
COPY --from=build-website /src/public /app/public
|
|
|
|
ENTRYPOINT ["./static-web-server", "-rootDir", "public", "-port", "80"]
|