mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 12:57:01 +02:00
Update to Go 1.26.4, build runners and go.mod depedencies (#3108)
* update golang and dependencies * fix incorrect log formatting * clean mod chache and introduce GOARCH in Dockerfile (choose dynamically) * remove GO111MODULE mentions * bump github actions from v2 to v3 * bump docker runners to v7 * use extra event store for backwards compatibility with existing codebase * updated generated opconfig api
This commit is contained in:
+9
-4
@@ -1,14 +1,19 @@
|
||||
ARG BASE_IMAGE=alpine:latest
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS builder
|
||||
ARG VERSION=latest
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY . /go/src/github.com/zalando/postgres-operator
|
||||
WORKDIR /go/src/github.com/zalando/postgres-operator
|
||||
|
||||
RUN GO111MODULE=on go mod vendor \
|
||||
&& CGO_ENABLED=0 go build -o build/postgres-operator -v -ldflags "-X=main.version=${VERSION}" cmd/main.go
|
||||
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
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
ARG BASE_IMAGE
|
||||
FROM --platform=$TARGETPLATFORM ${BASE_IMAGE}
|
||||
LABEL maintainer="Team ACID @ Zalando <team-acid@zalando.de>"
|
||||
LABEL org.opencontainers.image.source="https://github.com/zalando/postgres-operator"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user