Skip to content

Commit a0622bf

Browse files
committed
chore: add system images into the docker-bake.hcl
Signed-off-by: Jonathan Gonzalez V <jonathan.gonzalez@enterprisedb.com>
1 parent 7125c19 commit a0622bf

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,24 @@ RUN apt-get update && \
2929
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/*
3030

3131
USER 26
32+
33+
FROM standard AS system
34+
USER root
35+
ARG BARMAN_VERSION
36+
# Install barman-cloud
37+
RUN set -xe; \
38+
apt-get update; \
39+
apt-get install -y --no-install-recommends \
40+
# We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available
41+
build-essential python3-dev \
42+
python3-pip \
43+
python3-psycopg2 \
44+
python3-setuptools \
45+
; \
46+
pip3 install --break-system-packages --upgrade pip ; \
47+
pip3 install --break-system-packages ${BARMAN_VERSION} ; \
48+
# TODO: Remove --no-deps once https://github.com/pypa/pip/issues/9644 is solved
49+
#pip3 install --no-deps -r requirements.txt; \
50+
apt-get remove -y --purge --autoremove build-essential python3-dev; \
51+
rm -rf /var/lib/apt/lists/*;
52+
USER 26

docker-bake.hcl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ postgreSQLVersions = [
2929
"17.6"
3030
]
3131

32+
// Barman versions to build
33+
barmanVersion = "barman[cloud,azure,snappy,google,zstandard,lz4]==3.14.0"
34+
3235
extensions = [
3336
"pgaudit",
3437
"pgvector",
@@ -39,7 +42,8 @@ target "default" {
3942
matrix = {
4043
tgt = [
4144
"minimal",
42-
"standard"
45+
"standard",
46+
"system"
4347
]
4448
pgVersion = postgreSQLVersions
4549
base = [
@@ -69,6 +73,7 @@ target "default" {
6973
PG_MAJOR = "${getMajor(pgVersion)}"
7074
BASE = "${base}"
7175
EXTENSIONS = "${getExtensionsString(pgVersion, extensions)}"
76+
BARMAN_VERSION = "${barmanVersion}"
7277
}
7378
attest = [
7479
"type=provenance,mode=max",

0 commit comments

Comments
 (0)