-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
320 changed files
with
22,102 additions
and
8,114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
FROM golang:1.11-alpine as golang | ||
|
||
RUN apk add --update --no-cache ca-certificates curl git make | ||
RUN go get -u github.com/golang/dep/cmd/dep | ||
|
||
ADD Gopkg.toml /go/src/github.com/banzaicloud/logging-operator/Gopkg.toml | ||
ADD Gopkg.lock /go/src/github.com/banzaicloud/logging-operator/Gopkg.lock | ||
|
||
WORKDIR /go/src/github.com/banzaicloud/logging-operator | ||
RUN dep ensure -v -vendor-only | ||
ADD . /go/src/github.com/banzaicloud/logging-operator | ||
RUN go install ./cmd/manager | ||
|
||
|
||
FROM alpine:3.8 | ||
|
||
RUN apk add --no-cache ca-certificates | ||
|
||
COPY --from=golang /go/bin/manager /usr/local/bin/logging-operator | ||
|
||
RUN adduser -D logging-operator | ||
USER logging-operator | ||
|
||
ENTRYPOINT ["/usr/local/bin/logging-operator"] | ||
# Build the manager binary | ||
FROM golang:1.13 as builder | ||
|
||
WORKDIR /workspace | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
COPY pkg/ pkg/ | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go | ||
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:latest | ||
WORKDIR / | ||
COPY --from=builder /workspace/manager . | ||
ENTRYPOINT ["/manager"] |
Oops, something went wrong.