Tooling for managing asset compression, storage, and retrieval
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

  1. FROM ubuntu:20.04
  2. LABEL maintainer="Drew Short <warrick@sothr.com>" \
  3. name="acm" \
  4. version="1.5.0" \
  5. description="Prepackaged ACM with defaults and tooling"
  6. ENV LC_ALL=C.UTF-8
  7. ENV LANG=C.UTF-8
  8. ENV DEBIAN_FRONTEND=noninteractive
  9. # https://packages.ubuntu.com/search?suite=focal&section=all&arch=any&keywords=curl&searchon=names
  10. RUN ln -fs /usr/share/zoneinfo/UCT /etc/localtime \
  11. && apt-get update -y \
  12. && apt-get install -y --fix-missing \
  13. curl=7.68.0-1ubuntu2.7 \
  14. ffmpeg=7:4.2.4-1ubuntu0.1 \
  15. opus-tools=0.1.10-1 \
  16. optipng=0.7.7-1 \
  17. python3=3.8.2-0ubuntu2 \
  18. python3-pip=20.0.2-5ubuntu1.5 \
  19. tzdata=2021e-0ubuntu0.20.04 \
  20. webp=0.6.1-2ubuntu0.20.04.1
  21. WORKDIR /tmp
  22. # Install mozjpeg
  23. ARG MOZJPEG_VERSION="3.3.1"
  24. RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_amd64.deb" \
  25. && dpkg -i mozjpeg.deb \
  26. && ln -sf /opt/mozjpeg/bin/cjpeg /bin/cjpeg \
  27. && rm -f mozjpeg.deb
  28. # Install poetry
  29. ARG POETRY_VERSION="1.1.12"
  30. RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py | python -
  31. # Cleanup image programs and cache
  32. RUN apt-get remove -y curl \
  33. && rm -rf /var/lib/apt/lists/*
  34. WORKDIR /app
  35. # Copy application
  36. COPY . /app/
  37. # Install application requirements
  38. RUN python3 -m pip install -r requirements.txt
  39. WORKDIR /bin
  40. # Copy application helper script
  41. RUN mv /app/docker/acm acm
  42. # Make script executable
  43. RUN chmod +x acm
  44. VOLUME ["/input", "/output"]
  45. WORKDIR /app
  46. RUN mv docker/* . \
  47. && rm -rf docker \
  48. && mv acm-config.json.example acm-config.json
  49. CMD ["sh", "-c", "find /input/ -type f | /app/entrypoint.sh --stdin --remove-prefix /input/ compress -p default -d /output/"]