mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-09 10:47:05 +00:00
19 lines
476 B
Docker
19 lines
476 B
Docker
FROM golang:1.12.4 AS build-env
|
|
WORKDIR /go/src/github.com/reactiveops/polaris/
|
|
|
|
COPY . .
|
|
RUN go get -u github.com/gobuffalo/packr/v2/packr2
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 packr2 build -a -o polaris *.go
|
|
|
|
FROM alpine:3.9
|
|
WORKDIR /usr/local/bin
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
RUN addgroup -S polaris && adduser -u 1200 -S polaris -G polaris
|
|
USER 1200
|
|
COPY --from=build-env /go/src/github.com/reactiveops/polaris/polaris .
|
|
|
|
WORKDIR /opt/app
|
|
|
|
CMD ["polaris"]
|