mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-07 01:36:41 +00:00
* rename root fs check * speed up docker build * refactor webhook to be more generic * delete controllers pkg * revert deploy * fix example config * remove controllersToScan config * fix lint error * fix webhook name * FileSystem -> Filesystem * update deps * skip node owners * clean up meta tracking Co-authored-by: Robert Brennan <bobby.brennan@gmail.com>
29 lines
595 B
Docker
29 lines
595 B
Docker
FROM golang:1.13 AS build-env
|
|
WORKDIR /go/src/github.com/fairwindsops/polaris/
|
|
|
|
ENV GO111MODULE=on
|
|
ENV GOPROXY=https://proxy.golang.org
|
|
ENV CGO_ENABLED=0
|
|
ENV GOOS=linux
|
|
ENV GOARCH=amd64
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
RUN go get -u github.com/gobuffalo/packr/v2/packr2
|
|
|
|
COPY . .
|
|
RUN packr2 build -a -o polaris *.go
|
|
|
|
FROM alpine:3.10
|
|
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/fairwindsops/polaris/polaris .
|
|
|
|
WORKDIR /opt/app
|
|
|
|
CMD ["polaris"]
|