|
|
@ -13,12 +13,14 @@ ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
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-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 |
|
|
|
|
|
|
@ -26,18 +28,16 @@ WORKDIR /tmp |
|
|
|
|
|
|
|
# Install mozjpeg |
|
|
|
ARG MOZJPEG_VERSION="3.3.1" |
|
|
|
RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_amd64.deb" \ |
|
|
|
ARG MOZJPEG_ARCH="amd64" |
|
|
|
RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_${MOZJPEG_ARCH}.deb" \ |
|
|
|
&& dpkg -i mozjpeg.deb \ |
|
|
|
&& ln -sf /opt/mozjpeg/bin/cjpeg /bin/cjpeg \ |
|
|
|
&& rm -f mozjpeg.deb |
|
|
|
|
|
|
|
# Install poetry |
|
|
|
ARG POETRY_VERSION="1.1.12" |
|
|
|
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py | python - |
|
|
|
|
|
|
|
# Cleanup image programs and cache |
|
|
|
RUN apt-get remove -y curl \ |
|
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
RUN curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py" | python3 - |
|
|
|
ENV PATH="${PATH}:/root/.poetry/bin" |
|
|
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
@ -45,7 +45,13 @@ WORKDIR /app |
|
|
|
COPY . /app/ |
|
|
|
|
|
|
|
# Install application requirements |
|
|
|
RUN python3 -m pip install -r requirements.txt |
|
|
|
RUN poetry install |
|
|
|
|
|
|
|
# Cleanup image programs and cache |
|
|
|
RUN apt-get remove -y \ |
|
|
|
build-essential \ |
|
|
|
curl \ |
|
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
WORKDIR /bin |
|
|
|
|
|
|
|