Browse Source

Adding docker resources

add-file-preservation
Drew Short 5 years ago
parent
commit
3d6faf3a82
  1. 46
      Dockerfile
  2. 5
      docker/acm
  3. 3
      docker/entrypoint.sh

46
Dockerfile

@ -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"]

5
docker/acm

@ -0,0 +1,5 @@
#! /bin/sh
APP_DIRECTORY=/app
python3 ${APP_DIRECTORY}/acm.py $@

3
docker/entrypoint.sh

@ -0,0 +1,3 @@
#! /bin/sh
acm $@
Loading…
Cancel
Save