2021-11-07 12:20:12 +00:00
|
|
|
FROM luigi311/encoders-docker:20210901
|
2021-01-18 02:13:24 +00:00
|
|
|
|
2021-01-18 06:12:55 +00:00
|
|
|
ENV MPLCONFIGDIR="/home/app_user/"
|
2021-02-10 05:41:53 +00:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2021-10-01 20:48:40 +00:00
|
|
|
ARG DEPENDENCIES="mkvtoolnix curl llvm clang"
|
2021-01-31 21:20:23 +00:00
|
|
|
|
2021-02-10 18:16:59 +00:00
|
|
|
# Install dependencies
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2021-05-16 01:05:18 +00:00
|
|
|
${DEPENDENCIES} && \
|
2021-02-10 18:16:59 +00:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2021-05-15 06:09:01 +00:00
|
|
|
# Create user
|
|
|
|
RUN useradd -ms /bin/bash app_user
|
2021-01-31 21:20:23 +00:00
|
|
|
USER app_user
|
2021-01-18 02:13:24 +00:00
|
|
|
|
2021-05-16 01:05:18 +00:00
|
|
|
# Install rust
|
2021-11-07 12:20:12 +00:00
|
|
|
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain stable
|
2021-07-18 23:36:06 +00:00
|
|
|
ENV PATH="/home/app_user/.cargo/bin:$PATH"
|
2021-07-09 16:32:47 +00:00
|
|
|
|
|
|
|
# Copy av1an and build av1an
|
|
|
|
COPY --chown=app_user . /Av1an
|
2021-07-18 23:36:06 +00:00
|
|
|
WORKDIR /Av1an
|
|
|
|
RUN cargo build --release
|
2021-05-16 01:05:18 +00:00
|
|
|
|
2021-07-09 16:32:47 +00:00
|
|
|
# Open up /Av1an to all users
|
|
|
|
RUN chmod 777 /Av1an
|
|
|
|
|
2021-01-18 02:13:24 +00:00
|
|
|
VOLUME ["/videos"]
|
|
|
|
WORKDIR /videos
|
|
|
|
|
2021-07-18 23:36:06 +00:00
|
|
|
ENTRYPOINT [ "/Av1an/target/release/av1an" ]
|