Skip to content

Commit dae160f

Browse files
authored
K8SPG-837 improve image building process (#1422)
* K8SPG-837 improve image building process * add possibility of setting the base image via the build argument * bump k8s version
1 parent e97aebd commit dae160f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

build/postgres-operator/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
ARG BASE_IMAGE=ubi10
2+
13
FROM --platform=${BUILDPLATFORM} golang:1.25 AS go_builder
24
WORKDIR /go/src/github.com/percona/percona-postgresql-operator
35

@@ -45,7 +47,7 @@ RUN mkdir -p build/_output/bin \
4547
RUN ./bin/license_aggregator.sh ./cmd/...; \
4648
cp -r ./licenses /licenses
4749

48-
FROM registry.access.redhat.com/ubi10/ubi-minimal AS ubi10
50+
FROM registry.access.redhat.com/${BASE_IMAGE}/ubi-minimal AS ubi
4951
RUN microdnf update -y && microdnf clean all -y
5052

5153
LABEL name="Percona Postgres Operator" \

e2e-tests/build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ build_operator() {
5050
--build-arg GIT_BRANCH="${GIT_BRANCH}" \
5151
--build-arg BUILD_TIME="${BUILD_TIME}" \
5252
--build-arg GO_LDFLAGS="${GO_LDFLAGS}" \
53+
--build-arg BASE_IMAGE="${BASE_IMAGE:-ubi10}" \
5354
--progress plain \
5455
$imgresult \
5556
$squash \

0 commit comments

Comments
 (0)