mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-03 17:20:33 +02:00
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:
+1
-2
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user