Merge branch 'feature/smaller-docker-image' into 'master'
reduce size of docker image See merge request cfdisk/hemppa!4
This commit is contained in:
commit
3a21a96e59
12
Dockerfile
12
Dockerfile
|
@ -1,11 +1,15 @@
|
||||||
FROM python:3
|
FROM python:3.7-slim
|
||||||
|
|
||||||
WORKDIR /bot
|
WORKDIR /bot
|
||||||
RUN pip install pipenv && rm -rf /root/.cache
|
|
||||||
COPY Pipfile .
|
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 bot.py *.json *.pickle /bot/
|
||||||
COPY modules modules
|
COPY modules modules
|
||||||
|
|
||||||
CMD [ "pipenv", "run", "python", "-u", "./bot.py" ]
|
CMD [ "python", "-u", "./bot.py" ]
|
||||||
|
|
Loading…
Reference in New Issue