Skip to content

Commit f467bc8

Browse files
sxdmnencia
authored andcommitted
chore: add Barman base image
Now we build an image every week with the base packages required for the sidecar, the idea is to reduce the amount of time of every CI process requires to run. Signed-off-by: Jonathan Gonzalez V. <[email protected]>
1 parent a3ca353 commit f467bc8

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

containers/Dockerfile.sidecar

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,10 @@ COPY ../internal/ internal/
3333
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build \
3434
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/manager/main.go
3535

36-
# Build barman-cloud
36+
# Use plug-barman-cloud-base to get the dependencies
3737
# pip will build everything inside /usr/ since this is the case
38-
# we should build and then copy every file into a destination that will
39-
# then copy into the distroless container
40-
FROM python:3.13-slim-bookworm AS pythonbuilder
41-
COPY containers/sidecar-requirements.txt .
42-
RUN apt-get update && \
43-
apt-get install -y postgresql-common build-essential && \
44-
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
45-
apt-get install -y libpq-dev && \
46-
pip install -r sidecar-requirements.txt
38+
# Copy every file into a destination that will then copy into the distroless container
39+
FROM ghcr.io/cloudnative-pg/plugin-barman-cloud-base:latest AS pythonbuilder
4740
# Prepare a new /usr/ directory with the files we'll need in the final image
4841
RUN mkdir /new-usr/ && \
4942
cp -r --parents /usr/local/lib/ /usr/lib/*-linux-gnu/ /usr/local/bin/ \

0 commit comments

Comments
 (0)