diff options
author | James Mills <prologic@shortcircuit.net.au> | 2021-12-09 12:47:48 +1000 |
---|---|---|
committer | James Mills <prologic@shortcircuit.net.au> | 2021-12-09 12:47:48 +1000 |
commit | f66dbadf21c3509c94e355174be367ddfc20ac18 (patch) | |
tree | 810758a787b210b8cc117155aa1b2706b0c4620e /Dockerfile | |
parent | 582b9d78505bbd7bb9d623737687ece1585718a2 (diff) | |
download | zs-template-f66dbadf21c3509c94e355174be367ddfc20ac18.tar.gz |
Initial Commit with basic content, layout and simple.css
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 34 |
1 files changed, 34 insertions, 0 deletions
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"] |