2021-02-23 09:26:00 +00:00
|
|
|
FROM golang:1.16-buster as builder
|
2021-02-19 23:58:01 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN go get -d -v \
|
|
|
|
&& go install -v
|
|
|
|
|
|
|
|
RUN make build
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
LABEL MAINTAINER "Frank Jogeleit <frank.jogeleit@gweb.de>"
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN apk add --update --no-cache ca-certificates
|
|
|
|
|
|
|
|
RUN addgroup -S policyreporter && adduser -u 1234 -S policyreporter -G policyreporter
|
|
|
|
|
|
|
|
USER 1234
|
|
|
|
|
|
|
|
COPY --from=builder /app/LICENSE.md .
|
|
|
|
COPY --from=builder /app/build/policyreporter /app/policyreporter
|
|
|
|
|
|
|
|
EXPOSE 2112
|
|
|
|
|
2021-02-22 20:18:39 +00:00
|
|
|
ENTRYPOINT ["/app/policyreporter", "run"]
|