-
-
Notifications
You must be signed in to change notification settings - Fork 320
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (28 loc) · 1004 Bytes
/
Copy pathDockerfile
File metadata and controls
45 lines (28 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.14-slim AS base
LABEL name="ffsubsync"
LABEL maintainer="Stephen Macke <stephen.macke@gmail.com>"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
FROM base AS builder
ARG PIP_INSTALL_TARGET=.
ARG FFSUBSYNC_VERSION=
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential git python3-dev \
&& rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/opt/venv
RUN python -m venv "${VIRTUAL_ENV}"
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
COPY . .
RUN install_target="${FFSUBSYNC_VERSION:+ffsubsync==${FFSUBSYNC_VERSION}}" \
&& pip install --no-cache-dir "${install_target:-${PIP_INSTALL_TARGET}}"
RUN ffs --version
FROM base AS runtime
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
COPY --from=builder "${VIRTUAL_ENV}" "${VIRTUAL_ENV}"
WORKDIR /video
ENTRYPOINT [ "ffs" ]