Update Dockerfile
Browse files- Dockerfile +15 -9
Dockerfile
CHANGED
|
@@ -1,22 +1,28 @@
|
|
| 1 |
FROM python:3.10-slim-bullseye
|
| 2 |
-
ENV BUILD_PREFIX=/app
|
| 3 |
-
LABEL maintainer="foo@bar.com"
|
| 4 |
-
ARG TZ='Asia/Shanghai'
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# RUN echo /etc/apt/sources.list
|
| 9 |
# RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
|
| 10 |
-
|
| 11 |
|
| 12 |
ADD . ${BUILD_PREFIX}
|
| 13 |
-
COPY . ./app
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
WORKDIR ${BUILD_PREFIX}
|
| 17 |
|
| 18 |
ADD docker/entrypoint.sh /entrypoint.sh
|
| 19 |
-
ADD . .
|
| 20 |
|
| 21 |
RUN chmod +x /entrypoint.sh \
|
| 22 |
&& mkdir -p /home/noroot \
|
|
@@ -26,4 +32,4 @@ RUN chmod +x /entrypoint.sh \
|
|
| 26 |
|
| 27 |
USER noroot
|
| 28 |
|
| 29 |
-
|
|
|
|
| 1 |
FROM python:3.10-slim-bullseye
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# LABEL maintainer="foo@bar.com"
|
| 4 |
+
# ARG TZ='Asia/Shanghai'
|
| 5 |
+
|
| 6 |
+
# ARG CHATGPT_ON_WECHAT_VER
|
| 7 |
|
| 8 |
# RUN echo /etc/apt/sources.list
|
| 9 |
# RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
|
| 10 |
+
ENV BUILD_PREFIX=/app
|
| 11 |
|
| 12 |
ADD . ${BUILD_PREFIX}
|
|
|
|
| 13 |
|
| 14 |
+
RUN apt-get update \
|
| 15 |
+
&&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
|
| 16 |
+
&& cd ${BUILD_PREFIX} \
|
| 17 |
+
&& cp config-template.json config.json \
|
| 18 |
+
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \
|
| 19 |
+
&& pip install --no-cache -r requirements.txt \
|
| 20 |
+
&& pip install --no-cache -r requirements-optional.txt \
|
| 21 |
+
&& pip install azure-cognitiveservices-speech
|
| 22 |
+
|
| 23 |
WORKDIR ${BUILD_PREFIX}
|
| 24 |
|
| 25 |
ADD docker/entrypoint.sh /entrypoint.sh
|
|
|
|
| 26 |
|
| 27 |
RUN chmod +x /entrypoint.sh \
|
| 28 |
&& mkdir -p /home/noroot \
|
|
|
|
| 32 |
|
| 33 |
USER noroot
|
| 34 |
|
| 35 |
+
ENTRYPOINT ["/entrypoint.sh"]
|