lessmore/Dockerfile

20 lines
399 B
Docker

FROM golang:1.16 AS builder
ENV CGO_ENABLED=0
COPY . /build
WORKDIR /build
RUN go build -o /lessmore -v . && strip /lessmore
FROM alpine AS final
COPY --from=builder /lessmore /usr/local/bin/lessmore
COPY --from=builder /build/templates /usr/local/share/lessmore/templates
COPY --from=builder /build/static /usr/local/share/lessmore/static
USER nobody
ENTRYPOINT ["/usr/local/bin/lessmore"]