Update Dockerfile to use newly placed static web server.

This commit is contained in:
2023-03-22 01:00:01 -07:00
parent 663f45fcee
commit 7131a3bc5b
2 changed files with 1 additions and 6 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
# 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 registry.digitalocean.com/ssdocker/simplesystems/static-web-server:latest
WORKDIR /app
# Copy over static website files
COPY --from=build-website /src/public /app/public
ENTRYPOINT ["./static-web-server", "-rootDir", "public", "-port", "80"]