Slimming down dale-bot by adding --no-install-recommends, cuts 200MB off the image size
This commit is contained in:
parent
616c745855
commit
74da2235a9
@ -1,9 +1,12 @@
|
||||
FROM python:3.8 as build
|
||||
ADD app/requirements.txt /requirements.txt
|
||||
RUN apt-get update && apt-get install -y libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt
|
||||
|
||||
FROM python:3.8-slim
|
||||
RUN apt-get update && apt-get install -y libmagickwand-dev
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libmagickwand-dev \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get purge -y --auto-remove \
|
||||
&& rm -rf /var/lib/apt/lists/* /root
|
||||
COPY --from=0 /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
|
||||
ADD app /app
|
||||
CMD python /app/bot.py
|
||||
|
@ -1,9 +1,9 @@
|
||||
FROM python:3.8 as build
|
||||
ADD app/requirements.txt /requirements.txt
|
||||
RUN apt-get update && apt-get install -y libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libmagickwand-dev && pip install --no-cache-dir -q -r requirements.txt
|
||||
|
||||
FROM python:3.8-slim
|
||||
RUN apt-get update && apt-get install -y libmagickwand-dev
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libmagickwand-dev
|
||||
COPY --from=0 /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
|
||||
ADD app /app
|
||||
WORKDIR /app
|
||||
|
@ -8,7 +8,7 @@ image:
|
||||
repository: ldooks/dragon-bot
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: "130"
|
||||
tag: "131"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user