Browse Source

Change order of image layers for efficiency

master
Drew Short 4 years ago
parent
commit
cd39ec782a
  1. 8
      Dockerfile

8
Dockerfile

@ -11,10 +11,10 @@ RUN git clone --recurse-submodules https://github.com/azlux/botamusique.git . &&
FROM ${ARCH}python:3-slim-buster AS python-builder
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /botamusique
COPY --from=source /botamusique .
RUN apt-get update \
&& apt-get install -y gcc ffmpeg libjpeg-dev libmagic-dev opus-tools zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
COPY --from=source /botamusique .
RUN python3 -m venv venv \
&& venv/bin/pip install wheel \
&& venv/bin/pip install -r requirements.txt
@ -40,12 +40,12 @@ FROM ${ARCH}python:3-slim-buster
ENV DEBIAN_FRONTEND=noninteractive
EXPOSE 8181
WORKDIR /botamusique
COPY --from=python-builder /botamusique .
COPY --from=node-builder /botamusique/static static
COPY --from=template-builder /botamusique/templates templates
RUN apt-get update \
&& apt-get install -y ffmpeg libmagic-dev opus-tools zlib1g \
&& rm -rf /var/lib/apt/lists/*
COPY --from=python-builder /botamusique .
COPY --from=node-builder /botamusique/static static
COPY --from=template-builder /botamusique/templates templates
RUN chmod +x entrypoint.sh
ENTRYPOINT [ "/botamusique/entrypoint.sh" ]
CMD ["/botamusique/venv/bin/python", "/botamusique/mumbleBot.py"]
Loading…
Cancel
Save