Skip to content

Commit

Permalink
Merge pull request #5 from Monitoring-Projects/optimization/docker-pi…
Browse files Browse the repository at this point in the history
…p-no-cache-dir-install

use `--no-cache-dir` flag to `pip` in dockerfiles to save space
  • Loading branch information
nsano-rururu authored Nov 26, 2020
2 parents 35a5d42 + a5f6616 commit 44c5512
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ COPY patches/alerts.py /opt/elastalert/elastalert/alerts.py
RUN mkdir -p /opt/elastalert/rules/ /opt/elastalert/server_data/tests/ \
&& chown -R node:node /opt

RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir --upgrade pip

USER node

Expand All @@ -63,7 +63,7 @@ RUN sed -i 's/jira>=1.0.10,<1.0.15/jira>=2.0.0/g' requirements.txt && \
sed -i 's/py-zabbix==1.1.3/py-zabbix>=1.1.3/g' requirements.txt && \
sed -i 's/requests>=2.0.0/requests>=2.10.0/g' requirements.txt && \
sed -i 's/twilio==6.0.0/twilio>=6.0.0,<6.1/g' requirements.txt && \
pip3 install -r requirements.txt --user
pip3 install --no-cache-dir -r requirements.txt --user

WORKDIR /opt/elastalert-server

Expand Down

0 comments on commit 44c5512

Please sign in to comment.