chore(api/Dockerfile): pin alpine dependencies and bump watchfiles

This commit is contained in:
JuniorJPDJ 2022-11-22 23:00:29 +01:00
parent 069a118cc7
commit 0c6cc0ec5b
1 changed files with 10 additions and 8 deletions

View File

@ -21,9 +21,10 @@ RUN \
postgresql-dev \ postgresql-dev \
python3-dev \ python3-dev \
py3-psycopg2=2.9.5-r0 \ py3-psycopg2=2.9.5-r0 \
py3-cryptography \ py3-cryptography=38.0.3-r0 \
py3-lxml \ py3-lxml=4.9.1-r0 \
py3-pillow \ py3-pillow=9.3.0-r0 \
py3-watchfiles=0.18.1-r0 \
libldap \ libldap \
libffi-dev \ libffi-dev \
make \ make \
@ -53,14 +54,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|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 && \ grep -Ev 'cryptography|watchfiles|lxml|pillow|psycopg2' /requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 watchfiles==0.18.1 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|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 && \ grep -Ev 'cryptography|watchfiles|lxml|pillow|psycopg2' /dev-requirements.txt | pip3 install -r /dev/stdin cryptography==38.0.3 watchfiles==0.18.1 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" \
@ -84,9 +85,10 @@ RUN apk add --no-cache \
libxml2 \ libxml2 \
libxslt \ libxslt \
py3-psycopg2=2.9.5-r0 \ py3-psycopg2=2.9.5-r0 \
py3-cryptography \ py3-cryptography=38.0.3-r0 \
py3-lxml \ py3-lxml=4.9.1-r0 \
py3-pillow \ py3-pillow=9.3.0-r0 \
py3-watchfiles=0.18.1-r0 \
libldap libldap
COPY . /app COPY . /app