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 \ 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 \ tzdata=2021e-0ubuntu0.20.04 \ webp=0.6.1-2ubuntu0.20.04.1 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" \ && 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/* WORKDIR /app # Copy application COPY . /app/ # Install application requirements RUN python3 -m pip install -r requirements.txt 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/"]