Skip to content

Commit 85e06a6

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 85e06a6

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,25 @@ 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+
ARG BARMAN_VERSION
35+
36+
# We need to break the system packages to install barman-cloud in bookworm and later
37+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
38+
39+
USER root
40+
RUN apt-get update && \
41+
apt-get install -y --no-install-recommends \
42+
# We require build-essential and python3-dev to build lz4 on arm64 since there isn't a pre-compiled wheel available
43+
build-essential python3-dev \
44+
python3-pip \
45+
python3-psycopg2 \
46+
python3-setuptools \
47+
&& \
48+
pip3 install barman[cloud,azure,snappy,google,zstandard,lz4]==${BARMAN_VERSION} && \
49+
apt-get remove -y --purge --autoremove build-essential python3-dev && \
50+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
51+
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/*
52+
53+
USER 26

docker-bake.hcl

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

32+
// Barman version to build
33+
# renovate: datasource=github-releases depName=EnterpriseDB/barman versioning=loose
34+
barmanVersion = "3.14.0"
35+
3236
extensions = [
3337
"pgaudit",
3438
"pgvector",
@@ -39,7 +43,8 @@ target "default" {
3943
matrix = {
4044
tgt = [
4145
"minimal",
42-
"standard"
46+
"standard",
47+
"system"
4348
]
4449
pgVersion = postgreSQLVersions
4550
base = [
@@ -69,6 +74,7 @@ target "default" {
6974
PG_MAJOR = "${getMajor(pgVersion)}"
7075
BASE = "${base}"
7176
EXTENSIONS = "${getExtensionsString(pgVersion, extensions)}"
77+
BARMAN_VERSION = "${barmanVersion}"
7278
}
7379
attest = [
7480
"type=provenance,mode=max",

0 commit comments

Comments
 (0)