-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (29 loc) · 967 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.11-alpine
ENV PROJECT_NAME=python-slideshow
ENV WORKDIR=/${PROJECT_NAME}
WORKDIR ${WORKDIR}
ADD . ${WORKDIR}/${PROJECT_NAME}
ARG GUI=false
ARG SERVER=false
RUN if [ "$GUI" = "true" ]; then \
apk --update-cache add --no-cache qt6-qtbase-dev python3-pyqt6; \
PIP_INSTALL_CMD_SUFFIX="gui,"; \
fi \
&& if [ "$SERVER" = "true" ]; then \
PIP_INSTALL_CMD_SUFFIX=${PIP_INSTALL_CMD_SUFFIX}"server"; \
echo $PIP_INSTALL_CMD_SUFFIX; \
fi \
&& apk --update-cache add --no-cache ffmpeg \
&& eval "pip install ${WORKDIR}/${PROJECT_NAME}[${PIP_INSTALL_CMD_SUFFIX}]" \
&& rm -r ${WORKDIR}/${PROJECT_NAME}
# ENTRYPOINT ["sh"]
ENTRYPOINT ["slideshow"]
CMD [ \
"runserver", \
"--srcdir", "/python-slideshow/media/disk", \
"--dstdir", "/python-slideshow/media/_temp", \
"--port", "10011", \
"--log-level", "INFO", \
"--ffmpeg-loglevel", "QUIET" \
]
EXPOSE 10011