Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #48 from flanksource/moshloop
Browse files Browse the repository at this point in the history
chore: fix docker build
  • Loading branch information
moshloop committed Mar 8, 2021
2 parents 6521b76 + 027c9aa commit ec92e58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.12.5 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -14,11 +14,11 @@ COPY cmd/ cmd/
COPY pkg/ pkg/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager cmd/manager/main.go
RUN make linux

# 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"]
COPY --from=builder /workspace/platform-operator .
ENTRYPOINT ["/platform-operator"]
4 changes: 2 additions & 2 deletions Dockerfile.dev
Expand Up @@ -3,5 +3,5 @@
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:latest
WORKDIR /
COPY bin/manager .
ENTRYPOINT ["/manager"]
COPY bin/platform-operator .
ENTRYPOINT ["/platform-operator"]
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -40,11 +40,11 @@ e2e:
manager: fmt vet build

build:
go build -o bin/manager cmd/manager/main.go
go build -o bin/platform-operator cmd/manager/main.go

# Build manager binary
linux:
GOOS=linux go build -o bin/manager cmd/manager/main.go
GOOS=linux go build -o bin/platform-operator cmd/manager/main.go

# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet
Expand Down

0 comments on commit ec92e58

Please sign in to comment.