From f66dbadf21c3509c94e355174be367ddfc20ac18 Mon Sep 17 00:00:00 2001 From: James Mills Date: Thu, 9 Dec 2021 12:47:48 +1000 Subject: Initial Commit with basic content, layout and simple.css --- Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b5da4b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# Build +FROM golang:alpine AS build + +ENV CGO_ENABLED=0 + +RUN apk add --no-cache -U build-base git make + +RUN mkdir -p /src + +WORKDIR /src + +# Copy Makefile +COPY Makefile ./ + +# Install deps +RUN make deps + +# Copy content +COPY . . + +# Build the site +RUN make build + +# Runtime +FROM scratch + +WORKDIR / +VOLUME /data + +COPY --from=build /go/bin/static /static +COPY --from=build /src/.pub /data + +ENTRYPOINT ["/static"] +CMD ["-r", "/data"] -- cgit 1.4.1-2-gfad0