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.

71 lines
1.9 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. build-essential=12.8ubuntu1 \
  14. curl=7.68.0-1ubuntu2.7 \
  15. ffmpeg=7:4.2.4-1ubuntu0.1 \
  16. opus-tools=0.1.10-1 \
  17. optipng=0.7.7-1 \
  18. python3=3.8.2-0ubuntu2 \
  19. python3-distutils=3.8.10-0ubuntu1~20.04 \
  20. python3-apt=2.0.0ubuntu0.20.04.3 \
  21. tzdata=2021e-0ubuntu0.20.04 \
  22. webp=0.6.1-2ubuntu0.20.04.1
  23. WORKDIR /tmp
  24. # Install mozjpeg
  25. ARG MOZJPEG_VERSION="3.3.1"
  26. ARG MOZJPEG_ARCH="amd64"
  27. RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_${MOZJPEG_ARCH}.deb" \
  28. && dpkg -i mozjpeg.deb \
  29. && ln -sf /opt/mozjpeg/bin/cjpeg /bin/cjpeg \
  30. && rm -f mozjpeg.deb
  31. # Install poetry
  32. ARG POETRY_VERSION="1.1.12"
  33. RUN curl -sSL "https://raw.githubusercontent.com/python-poetry/poetry/${POETRY_VERSION}/get-poetry.py" | python3 -
  34. ENV PATH="${PATH}:/root/.poetry/bin"
  35. WORKDIR /app
  36. # Copy application
  37. COPY . /app/
  38. # Install application requirements
  39. RUN poetry install
  40. # Cleanup image programs and cache
  41. RUN apt-get remove -y \
  42. build-essential \
  43. curl \
  44. && rm -rf /var/lib/apt/lists/*
  45. WORKDIR /bin
  46. # Copy application helper script
  47. RUN mv /app/docker/acm acm
  48. # Make script executable
  49. RUN chmod +x acm
  50. VOLUME ["/input", "/output"]
  51. WORKDIR /app
  52. RUN mv docker/* . \
  53. && rm -rf docker \
  54. && mv acm-config.json.example acm-config.json
  55. CMD ["sh", "-c", "find /input/ -type f | /app/entrypoint.sh --stdin --remove-prefix /input/ compress -p default -d /output/"]