Skip to content

Commit

Permalink
Update DockerFile
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedwaleedmalik committed May 20, 2021
1 parent ec64503 commit 9524fa0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.15 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -12,11 +12,10 @@ 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 -mod=mod -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=mod -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
Expand Down

0 comments on commit 9524fa0

Please sign in to comment.