From 7cac953acce15f6c05a93e6031aa01aca6f49a31 Mon Sep 17 00:00:00 2001 From: paderlol Date: Fri, 2 Aug 2024 23:12:42 +0800 Subject: [PATCH] Fix Dockerfile style issue --- operator/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/Dockerfile b/operator/Dockerfile index 30375a1..0530af6 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=amd64 GO111MODULE=on go build -a -v -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} 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