Update Dockerfile to configure PostgreSQL repository and client
Replaced Debian's PostgreSQL client with version 17 and added the PostgreSQL apt repository for more control over versions. Switched from `apt` to `apt-get` for consistency, and included necessary dependencies like `wget` and `gnupg` for repository setup.
This commit is contained in:
parent
5295948b8c
commit
5537830592
1 changed files with 8 additions and 3 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -11,8 +11,13 @@ WORKDIR /app
|
||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
sed -i 's|https://deb.debian.org/debian|https://ftp.uk.debian.org/debian|g' /etc/apt/sources.list.d/debian.sources; \
|
sed -i 's|https://deb.debian.org/debian|https://ftp.uk.debian.org/debian|g' /etc/apt/sources.list.d/debian.sources; \
|
||||||
apt update; \
|
apt-get update; \
|
||||||
apt install -y --no-install-recommends --fix-missing \
|
apt-get install -y --no-install-recommends wget gnupg; \
|
||||||
|
wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -; \
|
||||||
|
echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" \
|
||||||
|
> /etc/apt/sources.list.d/pgdg.list; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends --fix-missing \
|
||||||
build-essential \
|
build-essential \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
gettext \
|
gettext \
|
||||||
|
|
@ -23,7 +28,7 @@ RUN set -eux; \
|
||||||
graphviz \
|
graphviz \
|
||||||
binutils \
|
binutils \
|
||||||
libproj-dev \
|
libproj-dev \
|
||||||
postgresql-client \
|
postgresql-client-17 \
|
||||||
gdal-bin; \
|
gdal-bin; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
pip install --upgrade pip; \
|
pip install --upgrade pip; \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue