fix(api/Dockerfile): use psycopg2 from alpine repository
This commit is contained in:
parent
ca2ad37aea
commit
c458bfe547
|
@ -20,7 +20,7 @@ RUN \
|
||||||
gcc \
|
gcc \
|
||||||
postgresql-dev \
|
postgresql-dev \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
py3-psycopg2 \
|
py3-psycopg2=2.9.5-r0 \
|
||||||
py3-cryptography \
|
py3-cryptography \
|
||||||
py3-lxml \
|
py3-lxml \
|
||||||
py3-pillow \
|
py3-pillow \
|
||||||
|
@ -53,14 +53,14 @@ RUN \
|
||||||
# is why we need to use the packages shipped by Alpine Linux.
|
# is why we need to use the packages shipped by Alpine Linux.
|
||||||
# Since poetry does not allow in-place dependency pinning, we need
|
# Since poetry does not allow in-place dependency pinning, we need
|
||||||
# to install the deps using pip.
|
# to install the deps using pip.
|
||||||
grep -Ev 'cryptography|uvicorn|watchgod|watchfiles|lxml|pillow' /requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 uvicorn==0.17.6 watchgod==0.8.2 lxml==4.9.1 pillow==9.3.0 && \
|
grep -Ev 'cryptography|uvicorn|watchgod|watchfiles|lxml|pillow|psycopg2' /requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 uvicorn==0.17.6 watchgod==0.8.2 lxml==4.9.1 pillow==9.3.0 psycopg2==2.9.5 && \
|
||||||
rm -rf "$PIP_DOWNLOAD_CACHE"
|
rm -rf "$PIP_DOWNLOAD_CACHE"
|
||||||
|
|
||||||
ARG install_dev_deps=0
|
ARG install_dev_deps=0
|
||||||
RUN \
|
RUN \
|
||||||
if [ "$install_dev_deps" = "1" ] ; then \
|
if [ "$install_dev_deps" = "1" ] ; then \
|
||||||
echo "Installing dev dependencies" && \
|
echo "Installing dev dependencies" && \
|
||||||
grep -Ev 'cryptography|uvicorn|watchgod|watchfiles|lxml|pillow' /dev-requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 uvicorn==0.17.6 watchgod==0.8.2 lxml==4.9.1 pillow==9.3.0 && \
|
grep -Ev 'cryptography|uvicorn|watchgod|watchfiles|lxml|pillow|psycopg2' /dev-requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 uvicorn==0.17.6 watchgod==0.8.2 lxml==4.9.1 pillow==9.3.0 psycopg2==2.9.5 && \
|
||||||
rm -rf "$PIP_DOWNLOAD_CACHE" \
|
rm -rf "$PIP_DOWNLOAD_CACHE" \
|
||||||
; else \
|
; else \
|
||||||
echo "Skipping dev deps installation" \
|
echo "Skipping dev deps installation" \
|
||||||
|
@ -83,6 +83,7 @@ RUN apk add --no-cache \
|
||||||
libpq \
|
libpq \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
libxslt \
|
libxslt \
|
||||||
|
py3-psycopg2=2.9.5-r0 \
|
||||||
py3-cryptography \
|
py3-cryptography \
|
||||||
py3-lxml \
|
py3-lxml \
|
||||||
py3-pillow \
|
py3-pillow \
|
||||||
|
|
Loading…
Reference in New Issue