-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 950 Bytes
/
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
FROM python:3.12-alpine AS base
FROM base AS builder
ARG SUBLIMINAL_VERSION=2.2.1
ARG WATCHDOG_VERSION=4.0.1
RUN pip install --no-cache-dir \
--no-compile \
--no-warn-script-location \
--disable-pip-version-check \
--prefix=/build \
subliminal==${SUBLIMINAL_VERSION} \
watchdog[watchmedo]==${WATCHDOG_VERSION} &&\
find /build -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \
\( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \
\) -exec rm -rf '{}' +;
FROM base
COPY --from=builder /build /usr/local
# This hack is widely applied to avoid python printing issues in docker containers.
# See: https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/pull/13
ENV PYTHONUNBUFFERED=1
VOLUME /cache
CMD watchmedo --help && echo && subliminal --help