fix: ensure /var/lib/postgresql/data doesn't exist is system containers (#246)

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
This commit is contained in:
Niccolò Fei
2025-07-14 09:24:08 +02:00
committed by GitHub
parent 273f3e233c
commit 2d191a5c54
2 changed files with 3 additions and 1 deletions

View File

@@ -28,7 +28,8 @@ LABEL org.opencontainers.image.description="This Docker image contains PostgreSQ
COPY requirements.txt / COPY requirements.txt /
# Install additional extensions # Install additional extensions
# RUN set -xe; \ RUN set -xe; \
rm -fr /var/lib/postgresql/data
# apt-get update; \ # apt-get update; \
# apt-get install -y --no-install-recommends \ # apt-get install -y --no-install-recommends \
# "postgresql-${PG_MAJOR}-pgvector" \ # "postgresql-${PG_MAJOR}-pgvector" \

View File

@@ -29,6 +29,7 @@ COPY requirements.txt /
# Install additional extensions # Install additional extensions
RUN set -xe; \ RUN set -xe; \
rm -fr /var/lib/postgresql/data; \
apt-get update; \ apt-get update; \
if apt-get -s upgrade | grep "^Inst postgres"; then \ if apt-get -s upgrade | grep "^Inst postgres"; then \
echo "ERROR: Upgradable postgres packages found!"; \ echo "ERROR: Upgradable postgres packages found!"; \