Skip to content

Commit 52750ab

Browse files
committed
initial logging-operator v2
1 parent ef29224 commit 52750ab

File tree

306 files changed

+18999
-8791
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+18999
-8791
lines changed

.circleci/config.yml

-156
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

-27
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

-20
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

-34
This file was deleted.

Dockerfile

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
FROM golang:1.11-alpine as golang
2-
3-
RUN apk add --update --no-cache ca-certificates curl git make
4-
RUN go get -u github.com/golang/dep/cmd/dep
5-
6-
ADD Gopkg.toml /go/src/github.com/banzaicloud/logging-operator/Gopkg.toml
7-
ADD Gopkg.lock /go/src/github.com/banzaicloud/logging-operator/Gopkg.lock
8-
9-
WORKDIR /go/src/github.com/banzaicloud/logging-operator
10-
RUN dep ensure -v -vendor-only
11-
ADD . /go/src/github.com/banzaicloud/logging-operator
12-
RUN go install ./cmd/manager
13-
14-
15-
FROM alpine:3.8
16-
17-
RUN apk add --no-cache ca-certificates
18-
19-
COPY --from=golang /go/bin/manager /usr/local/bin/logging-operator
20-
21-
RUN adduser -D logging-operator
22-
USER logging-operator
23-
24-
ENTRYPOINT ["/usr/local/bin/logging-operator"]
1+
# Build the manager binary
2+
FROM golang:1.13 as builder
3+
4+
WORKDIR /workspace
5+
# Copy the Go Modules manifests
6+
COPY go.mod go.mod
7+
COPY go.sum go.sum
8+
# cache deps before building and copying source so that we don't need to re-download as much
9+
# and so that source changes don't invalidate our downloaded layer
10+
RUN go mod download
11+
12+
# Copy the go source
13+
COPY main.go main.go
14+
COPY api/ api/
15+
COPY controllers/ controllers/
16+
COPY pkg/ pkg/
17+
18+
# Build
19+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
20+
21+
# Use distroless as minimal base image to package the manager binary
22+
# Refer to https://github.com/GoogleContainerTools/distroless for more details
23+
FROM gcr.io/distroless/static:latest
24+
WORKDIR /
25+
COPY --from=builder /workspace/manager .
26+
ENTRYPOINT ["/manager"]

0 commit comments

Comments
 (0)