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.

50 lines
981 B

  1. FROM ubuntu:18.04
  2. ENV LC_ALL=C.UTF-8
  3. ENV LANG=C.UTF-8
  4. ARG MOZJPEG_VERSION="3.3.1"
  5. # Install tooling (ffmpeg, opusenc, optipng, python3)
  6. RUN apt-get update \
  7. && apt-get install -y \
  8. ffmpeg \
  9. python3 \
  10. python3-pip \
  11. opus-tools \
  12. optipng \
  13. curl
  14. WORKDIR /tmp
  15. # Install mozjpeg
  16. RUN curl -LS -o mozjpeg.deb "https://nexus.nulloctet.com/repository/public/mozjpeg/mozjpeg_${MOZJPEG_VERSION}_amd64.deb" \
  17. && dpkg -i mozjpeg.deb \
  18. && ln -sf /opt/mozjpeg/bin/cjpeg /bin/cjpeg \
  19. && rm -f mozjpeg.deb
  20. # Cleanup image programs and cache
  21. RUN apt-get remove -y curl \
  22. && rm -rf /var/lib/apt/lists/*
  23. WORKDIR /app
  24. # Copy application
  25. COPY acm.py requirements.txt /app/
  26. # Install application requirements
  27. RUN python3 -m pip install -r requirements.txt
  28. WORKDIR /bin
  29. # Copy application helper script
  30. COPY docker/acm acm
  31. # Make script executable
  32. RUN chmod +x acm
  33. WORKDIR /project
  34. COPY docker/entrypoint.sh .
  35. CMD ["sh", "/project/entrypoint.sh"]