diff --git a/operator/Dockerfile b/operator/Dockerfile index 0530af6..30375a1 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,7 +1,7 @@ # Build the manager binary FROM golang:1.16 AS builder -ARG TARGETARCH + WORKDIR /workspace # Copy the Go Modules manifests @@ -20,7 +20,7 @@ COPY pkg/ pkg/ ADD https://raw.githubusercontent.com/alibaba/nacos/develop/distribution/conf/mysql-schema.sql config/sql/nacos-mysql.sql # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -a -v -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -v -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