From ef3b2dac22437b5de70c96b199c3f8232f5ea3ce Mon Sep 17 00:00:00 2001 From: Drew Short Date: Mon, 27 Dec 2021 09:48:29 -0600 Subject: [PATCH] Update pinning, reduce image size, configure poetry to not use venv --- Dockerfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa19841..efff4a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,17 +12,20 @@ ENV DEBIAN_FRONTEND=noninteractive # https://packages.ubuntu.com/search?suite=focal§ion=all&arch=any&keywords=curl&searchon=names RUN ln -fs /usr/share/zoneinfo/UCT /etc/localtime \ && apt-get update -y \ - && apt-get install -y --fix-missing \ - build-essential=12.8ubuntu1 \ - curl=7.68.0-1ubuntu2.7 \ - ffmpeg=7:4.2.4-1ubuntu0.1 \ - opus-tools=0.1.10-1 \ - optipng=0.7.7-1 \ - python3=3.8.2-0ubuntu2 \ - python3-distutils=3.8.10-0ubuntu1~20.04 \ - python3-apt=2.0.0ubuntu0.20.04.3 \ - tzdata=2021e-0ubuntu0.20.04 \ - webp=0.6.1-2ubuntu0.20.04.1 + && apt-get install -f -y --no-install-recommends \ + build-essential=12.8ubuntu1 \ + curl=7.68.0-1ubuntu2.7 \ + ffmpeg=7:4.2.4-1ubuntu0.1 \ + opus-tools=0.1.10-1 \ + optipng=0.7.7-1 \ + python-pip-whl=20.0.2-5ubuntu1.5 \ + python3=3.8.2-0ubuntu2 \ + python3-pip=20.0.2-5ubuntu1.5 \ + python3-distutils=3.8.10-0ubuntu1~20.04 \ + python3-apt=2.0.0ubuntu0.20.04.3 \ + tzdata=2021e-0ubuntu0.20.04 \ + webp=0.6.1-2ubuntu0.20.04.1 \ + && apt-get upgrade -y WORKDIR /tmp @@ -38,6 +41,7 @@ RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjp ARG POETRY_VERSION="1.1.12" RUN curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py" | python3 - ENV PATH="${PATH}:/root/.poetry/bin" +RUN poetry config virtualenvs.create false WORKDIR /app @@ -51,6 +55,7 @@ RUN poetry install RUN apt-get remove -y \ build-essential \ curl \ + python3-pip \ && rm -rf /var/lib/apt/lists/* WORKDIR /bin