reduce size of docker image

This commit is contained in:
Frank Becker 2020-02-04 23:18:58 +01:00
parent ad4d66e900
commit bcc9e5f292
1 changed files with 8 additions and 4 deletions

View File

@ -1,11 +1,15 @@
FROM python:3
FROM python:3.7-slim
WORKDIR /bot
RUN pip install pipenv && rm -rf /root/.cache
COPY Pipfile .
RUN pipenv install --pre && rm -rf /root/.cache
RUN pip install pipenv && \
pipenv install --pre && \
pipenv install --deploy --system && \
rm -r /root/.cache/* && \
rm -r /root/.local/*
COPY bot.py *.json *.pickle /bot/
COPY modules modules
CMD [ "pipenv", "run", "python", "-u", "./bot.py" ]
CMD [ "python", "-u", "./bot.py" ]