-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (34 loc) · 1.23 KB
/
Dockerfile
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
46
47
48
49
50
51
ARG PYTHON_IMAGE_VERSION=3.11
FROM python:${PYTHON_IMAGE_VERSION}-slim-bookworm AS base
LABEL maintainer="ToshY (github.com/ToshY)"
ENV PIP_ROOT_USER_ACTION=ignore
WORKDIR /build
RUN <<EOT bash
set -ex
apt-get update
apt install -y build-essential cmake wget
wget -O /usr/share/keyrings/gpg-pub-moritzbunkus.gpg https://mkvtoolnix.download/gpg-pub-moritzbunkus.gpg
echo "deb [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ bookworm main" > /etc/apt/sources.list.d/mkvtoolnix.download.list
echo "deb-src [signed-by=/usr/share/keyrings/gpg-pub-moritzbunkus.gpg] https://mkvtoolnix.download/debian/ bookworm main" >> /etc/apt/sources.list.d/mkvtoolnix.download.list
apt-get update
apt install -y mkvtoolnix
apt-get clean
rm -rf /var/lib/apt/lists/*
EOT
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir --upgrade --force-reinstall 'setuptools>=65.5.1'
FROM base AS prod
COPY . .
RUN pip install .
WORKDIR /app
RUN <<EOT bash
set -ex
mkdir -p ./{input,output}
rm -rf /build
EOT
ENTRYPOINT ["mkvexport"]
FROM base AS dev
WORKDIR /app
COPY requirements.dev.txt ./
RUN pip install --no-cache-dir -r requirements.dev.txt