Skip to content

Commit 9ec38a0

Browse files
committed
arg fix
1 parent e703855 commit 9ec38a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Build the manager binary
22
FROM golang:1.21 AS builder
3-
ARG TARGETOS
4-
ARG TARGETARCH
53

64
WORKDIR /workspace
75
# Copy the Go Modules manifests
@@ -21,7 +19,7 @@ COPY internal/controller/ internal/controller/
2119
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
2220
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2321
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
24-
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
22+
RUN CGO_ENABLED=0 go build -a -o manager cmd/main.go
2523

2624
# Use distroless as minimal base image to package the manager binary
2725
# Refer to https://github.com/GoogleContainerTools/distroless for more details

0 commit comments

Comments
 (0)