fix dockerfile

This commit is contained in:
jxxghp 2023-06-07 14:00:50 +08:00
parent e1d9637b53
commit f5f54991e5
2 changed files with 7 additions and 5 deletions

View File

@ -1 +1,5 @@
# MoviePilot
基于 [NAStool](https://github.com/NAStool/nas-tools) 部分代码重新设计,聚焦自动化核心需求,减少问题同时更易于扩展和维护。
仍在开发中,当前不具备使用条件。

View File

@ -1,4 +1,4 @@
FROM alpine:3.17 AS Builder
FROM alpine:3.17
RUN apk add --no-cache --virtual .build-deps \
libffi-dev \
gcc \
@ -11,8 +11,6 @@ RUN apk add --no-cache --virtual .build-deps \
&& python -m pip install --upgrade pip setuptools wheel \
&& apk del --purge .build-deps \
&& rm -rf /tmp/* /root/.cache /var/cache/apk/*
FROM scratch AS APP
COPY --from=Builder / /
ENV LANG="C.UTF-8" \
TZ="Asia/Shanghai" \
PS1="\u@\h:\w \$ " \
@ -46,9 +44,9 @@ ENV LANG="C.UTF-8" \
DOUBAN_USER_IDS=""
COPY . ${WORKDIR}
WORKDIR ${WORKDIR}
RUN /usr/bin/python3 -m pip install -r requirements.txt \
RUN pip install -r requirements.txt \
&& echo 'fs.inotify.max_user_watches=5242880' >> /etc/sysctl.conf \
&& echo 'fs.inotify.max_user_instances=5242880' >> /etc/sysctl.conf
EXPOSE 3001
VOLUME ["/config"]
ENTRYPOINT [ "/usr/bin/python3", "app/main.py" ]
ENTRYPOINT [ "python", "app/main.py" ]