Separate pipeline for internal/external build and support multi arch (#2991)

* separate pipeline for internal/external build and support multi arch
* remove distutils and use node:lts-alpine in both
* change base image arguments
* fix local naming and base image
* address feedback

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
Ida Novindasari
2025-12-10 16:45:42 +01:00
committed by GitHub
co-authored by Felix Kunde
parent 842c6eded3
commit 1b4ffb0875
6 changed files with 70 additions and 32 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=registry.opensource.zalan.do/library/python-3.11-slim:latest
ARG BASE_IMAGE=python:3.11-slim
ARG NODE_IMAGE=node:lts-alpine
FROM $NODE_IMAGE AS build
+16 -5
View File
@@ -1,6 +1,7 @@
.PHONY: clean test appjs docker push mock
IMAGE ?= registry.opensource.zalan.do/acid/postgres-operator-ui
IMAGE ?= postgres-operator-ui
BASE_IMAGE ?= python:3.11-slim
VERSION ?= $(shell git describe --tags --always --dirty)
TAG ?= $(VERSION)
GITHEAD = $(shell git rev-parse --short HEAD)
@@ -30,10 +31,20 @@ docker: appjs
echo "Version ${VERSION}"
echo "CDP tag ${CDP_TAG}"
echo "git describe $(shell git describe --tags --always --dirty)"
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)" -f Dockerfile .
push:
docker push "$(IMAGE):$(TAG)$(CDP_TAG)"
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)" -f Dockerfile --build-arg BASE_IMAGE="${BASE_IMAGE}" .
docker-push: appjs
echo "Tag ${TAG}"
echo "Version ${VERSION}"
echo "CDP tag ${CDP_TAG}"
echo "git describe $(shell git describe --tags --always --dirty)"
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
docker buildx build --platform linux/amd64,linux/arm64 \
--build-arg BASE_IMAGE="${BASE_IMAGE}" \
-f Dockerfile \
-t "$(IMAGE):$(TAG)$(CDP_TAG)" \
--push .
echo "$(IMAGE):$(TAG)$(CDP_TAG)"
mock:
docker run -it -p 8081:8081 "$(IMAGE):$(TAG)" --mock