Optimized deb packages installed in Docker (#106)

This commit is contained in:
Paolo Melchiorre 2022-12-05 02:31:32 +01:00 committed by GitHub
parent 4493eefb76
commit 6cf344360a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,12 +3,24 @@ ARG IMAGE_LABEL=3.11.0-slim-buster
FROM ${IMAGE_HOST}:${IMAGE_LABEL}
RUN apt-get update && apt-get -y install libpq-dev libxml2-dev libxslt1-dev zlib1g-dev python3-dev build-essential
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpq5 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements.txt
RUN pip3 install --upgrade pip \
&& pip3 install --upgrade -r requirements.txt
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
libc6-dev \
libpq-dev \
&& python3 -m pip install --upgrade -r requirements.txt \
&& apt-get purge -y --auto-remove \
gcc \
libc6-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY . /takahe