Use webserver image.
This commit is contained in:
parent
e41b80cc6a
commit
8f8eae8554
@ -12,23 +12,12 @@ RUN apk update && apk upgrade && \
|
|||||||
|
|
||||||
RUN hugo --minify
|
RUN hugo --minify
|
||||||
|
|
||||||
# STEP 2: Build the static-web-server
|
# STEP 2: Add static files to webserver image
|
||||||
FROM golang:alpine AS build-webserver
|
FROM docker.simplesystems.tech/simplesystems/webserver:latest
|
||||||
|
|
||||||
RUN apk update && apk upgrade && \
|
|
||||||
apk add --no-cache git
|
|
||||||
|
|
||||||
RUN go get -u git.simplesystems.tech/simplesystems/static-web-server
|
|
||||||
|
|
||||||
# STEP 3: Combine static files and binary on fresh alpine image
|
|
||||||
FROM alpine:latest
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy over static website files
|
# Copy over static website files
|
||||||
COPY --from=build-website /src/public /app/public
|
COPY --from=build-website /src/public /app/public
|
||||||
|
|
||||||
# Copy over static-web-server
|
ENTRYPOINT ["./static-web-server", "-rootDir", "public", "-port", "8080"]
|
||||||
COPY --from=build-webserver /go/bin/static-web-server /app/
|
|
||||||
|
|
||||||
ENTRYPOINT ["./static-web-server", "-rootDir", "public", "-port", "80"]
|
|
||||||
|
Loading…
Reference in New Issue
Block a user