update docker build commands in Makefiles to use buildx (#3137)

* switch to docker buildx and update docs
* minor update to e2e Dockerfile
This commit is contained in:
Felix Kunde
2026-07-23 16:24:23 +02:00
committed by GitHub
parent ca9513c831
commit 86d3027e0d
8 changed files with 11 additions and 13 deletions
+1 -2
View File
@@ -8,12 +8,11 @@ ARG TARGETARCH
COPY . /go/src/github.com/zalando/postgres-operator
WORKDIR /go/src/github.com/zalando/postgres-operator
RUN go clean -cache -modcache
RUN go mod vendor \
&& CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o build/postgres-operator -v -ldflags "-X=main.version=${VERSION}" cmd/main.go
ARG BASE_IMAGE
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
FROM ${BASE_IMAGE}
LABEL maintainer="Team ACID @ Zalando <team-acid@zalando.de>"
LABEL org.opencontainers.image.source="https://github.com/zalando/postgres-operator"
-1
View File
@@ -26,6 +26,5 @@ export PATH="$PATH:$HOME/go/bin"
export GOPATH="$HOME/go"
mkdir -p build
go clean -cache -modcache
go mod vendor
CGO_ENABLED=0 go build -o build/postgres-operator -v -ldflags "$OPERATOR_LDFLAGS" cmd/main.go