|
@ -0,0 +1,46 @@ |
|
|
|
|
|
FROM ubuntu:18-04-slim |
|
|
|
|
|
|
|
|
|
|
|
ARG MOZJPEG_VERSION=3.3.1 |
|
|
|
|
|
|
|
|
|
|
|
# Install tooling (ffmpeg, opusenc, optipng, python3) |
|
|
|
|
|
RUN apt-get update \ |
|
|
|
|
|
&& apt-get install -y \ |
|
|
|
|
|
ffmpeg \ |
|
|
|
|
|
python3 \ |
|
|
|
|
|
python3-pip \ |
|
|
|
|
|
opus-tools \ |
|
|
|
|
|
optipng \ |
|
|
|
|
|
curl |
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /tmp |
|
|
|
|
|
|
|
|
|
|
|
# Install mozjpeg |
|
|
|
|
|
RUN curl -LS -o mozjpeg.deb https://mozjpeg.codelove.de/bin/mozjpeg_$MOZJPEG_VERSION_amd64.deb \ |
|
|
|
|
|
&& dpkg -i mozjpeg.deb \ |
|
|
|
|
|
&& rm -f mozjpeg.deb |
|
|
|
|
|
|
|
|
|
|
|
# Cleanup image programs and cache |
|
|
|
|
|
RUN apt-get remove curl \ |
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /acm |
|
|
|
|
|
|
|
|
|
|
|
# Copy application |
|
|
|
|
|
COPY acm.py requirements.txt . |
|
|
|
|
|
|
|
|
|
|
|
# Install application requirements |
|
|
|
|
|
RUN python3 -m pip install -r requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /bin |
|
|
|
|
|
|
|
|
|
|
|
# Copy application helper script |
|
|
|
|
|
COPY docker/acm acm |
|
|
|
|
|
|
|
|
|
|
|
# Make script executable |
|
|
|
|
|
RUN chmod +x acm |
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /project |
|
|
|
|
|
|
|
|
|
|
|
COPY docker/entrypoint.sh . |
|
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["entrypoint.sh"] |