FROM ubuntu:20.04 LABEL maintainer="Drew Short " \ name="acm" \ version="1.5.0" \ description="Prepackaged ACM with defaults and tooling" ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 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 WORKDIR /tmp # Install mozjpeg ARG MOZJPEG_VERSION="3.3.1" 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" | python3 - ENV PATH="${PATH}:/root/.poetry/bin" WORKDIR /app # Copy application COPY . /app/ # Install application requirements RUN poetry install # Cleanup image programs and cache RUN apt-get remove -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* WORKDIR /bin # Copy application helper script RUN mv /app/docker/acm acm # Make script executable RUN chmod +x acm VOLUME ["/input", "/output"] WORKDIR /app RUN mv docker/* . \ && rm -rf docker \ && mv acm-config.json.example acm-config.json CMD ["sh", "-c", "find /input/ -type f | /app/entrypoint.sh --stdin --remove-prefix /input/ compress -p default -d /output/"]