add python3-psycopg2 as build dep

This commit is contained in:
Adrien le Maire 2020-07-29 17:05:51 +02:00
parent 91e473f5ea
commit 90d1fcdfe8

View File

@ -35,15 +35,18 @@ COPY --from=pg12-builder /usr/lib/postgresql/12/bin/psql /usr/local/pgsql/pgsql-
FROM debian:stable-20200720-slim
ARG DEBIAN_FRONTEND=noninteractive
ADD https://curl.haxx.se/ca/cacert.pem /etc/ssl/certs/cacert.pem
ENV CURL_CA_BUNDLE=/etc/ssl/certs/cacert.pem
COPY --from=tool-builder /usr/local/pgsql /usr/local/
ARG TARGETARCH
ARG VERSION=4.24
ARG GUNICORN_VERSION=20.0.4
RUN apt update -qq && apt install -qqy --no-install-recommends python3-pip python3-dev python3-setuptools gcc && \
RUN apt update -qq && apt install -qqy --no-install-recommends python3-pip python3-dev python3-setuptools python3-psycopg2 gcc && \
pip3 install --no-cache-dir pgadmin4==${VERSION} gunicorn==${GUNICORN_VERSION} && \
apt remove -qqy gcc python3-dev python3-pip && apt autoremove -qqy && rm -rf /var/lib/apt/lists/* && \
apt remove -qqy gcc python3-dev python3-pip python3-psycopg2 && apt autoremove -qqy && rm -rf /var/lib/apt/lists/* && \
ln -s /usr/local/lib/python3.7/dist-packages/pgadmin4 /pgadmin4 && \
ln -s /usr/bin/python3 /usr/bin/python && \
groupadd -g 5050 pgadmin && \