Update Dockerfile
Browse files- Dockerfile +14 -10
Dockerfile
CHANGED
|
@@ -7,25 +7,29 @@ FROM python:3.10-slim-bullseye
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
RUN apt-get update \
|
| 15 |
&&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
|
| 16 |
-
&& cd $
|
| 17 |
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \
|
| 18 |
&& pip install --no-cache -r requirements.txt \
|
| 19 |
&& pip install --no-cache -r requirements-optional.txt \
|
| 20 |
&& pip install azure-cognitiveservices-speech
|
| 21 |
|
| 22 |
-
WORKDIR $
|
| 23 |
|
| 24 |
ADD docker/entrypoint.sh /entrypoint.sh
|
| 25 |
|
| 26 |
-
RUN chmod +x /entrypoint.sh
|
| 27 |
-
RUN useradd -m -u 1000 noroot
|
| 28 |
-
|
| 29 |
-
USER noroot
|
| 30 |
-
|
| 31 |
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
| 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 |
+
RUN chmod +x /entrypoint.sh
|
| 11 |
+
RUN useradd -m -u 1000 user
|
| 12 |
+
USER user
|
| 13 |
+
ENV HOME=/home/user \
|
| 14 |
+
PATH=/home/user/.local/bin:$PATH
|
| 15 |
+
WORKDIR $HOME/app
|
| 16 |
+
COPY --chown=user . $HOME/app
|
| 17 |
+
RUN chmod 777 /app
|
| 18 |
+
|
| 19 |
+
# ENV BUILD_PREFIX=/app
|
| 20 |
+
# ENV PATH="$PATH:/root/.local/bin"
|
| 21 |
+
ADD --chown=user . $HOME
|
| 22 |
|
| 23 |
RUN apt-get update \
|
| 24 |
&&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
|
| 25 |
+
&& cd $HOME \
|
| 26 |
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \
|
| 27 |
&& pip install --no-cache -r requirements.txt \
|
| 28 |
&& pip install --no-cache -r requirements-optional.txt \
|
| 29 |
&& pip install azure-cognitiveservices-speech
|
| 30 |
|
| 31 |
+
WORKDIR $HOME
|
| 32 |
|
| 33 |
ADD docker/entrypoint.sh /entrypoint.sh
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
ENTRYPOINT ["/entrypoint.sh"]
|