Skip to content

Commit

Permalink
initial logging-operator v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tarokkk committed Sep 13, 2019
1 parent ef29224 commit 52750ab
Show file tree
Hide file tree
Showing 306 changed files with 18,999 additions and 8,791 deletions.
156 changes: 0 additions & 156 deletions .circleci/config.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

34 changes: 0 additions & 34 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

50 changes: 26 additions & 24 deletions Dockerfile
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"]
Loading

0 comments on commit 52750ab

Please sign in to comment.