forked from bjdbjd/publish-helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (25 loc) · 901 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
FROM python:3.11.4-slim-bullseye
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV API_PORT="15372" \
NGINX_PORT="15373" \
UMASK=000
WORKDIR "/app"
COPY lib_deb lib_deb
COPY src src
COPY static static
COPY temp temp
COPY dist dist
COPY requirements_api.txt requirements_api.txt
RUN mkdir media \
&& cp -r lib_deb/sources.list /etc/apt/sources.list \
&& apt-get update -o Acquire::Check-Valid-Until=false \
&& apt-get install -y libmediainfo0v5 libzen0v5 nginx gettext-base \
&& cp -r lib_deb/entrypoint entrypoint \
&& chmod +x entrypoint \
&& cp -r dist /public \
&& cp -r lib_deb/nginx.conf /etc/nginx/nginx.template.conf\
&& pip install -r requirements_api.txt --trusted-host mirrors.aliyun.com --default-timeout=600 -i https://mirrors.aliyun.com/pypi/simple/
USER root
EXPOSE 15372 15373
ENV PYTHONPATH=${PYTHONPATH}:.
CMD ["sh", "entrypoint"]