Skip to content

Commit eefbd51

Browse files
authored
Merge pull request #234 from Monitoring-Projects/Rajpratik71-patch-1
feat : use --no-cache-dir flag to pip in dockerfiles to save space
2 parents 1cf3a99 + bbc1a1f commit eefbd51

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ RUN true \
6868
&& virtualenv -p python3 /opt/graphite \
6969
&& . /opt/graphite/bin/activate \
7070
&& echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so \
71-
&& pip install \
71+
&& pip install --no-cache-dir \
7272
cairocffi==1.1.0 \
7373
django==4.2.15 \
7474
django-tagging==0.5.0 \
@@ -93,6 +93,7 @@ ARG whisper_repo=https://github.com/graphite-project/whisper.git
9393
RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whisper \
9494
&& cd /usr/local/src/whisper \
9595
&& . /opt/graphite/bin/activate \
96+
&& pip3 install --no-cache-dir -r requirements.txt \
9697
&& python3 ./setup.py install $python_extra_flags
9798

9899
# install carbon
@@ -102,7 +103,7 @@ ARG carbon_repo=https://github.com/graphite-project/carbon.git
102103
RUN . /opt/graphite/bin/activate \
103104
&& git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon \
104105
&& cd /usr/local/src/carbon \
105-
&& pip3 install -r requirements.txt \
106+
&& pip3 install --no-cache-dir -r requirements.txt \
106107
&& python3 ./setup.py install $python_extra_flags
107108

108109
# install graphite
@@ -112,7 +113,7 @@ ARG graphite_repo=https://github.com/graphite-project/graphite-web.git
112113
RUN . /opt/graphite/bin/activate \
113114
&& git clone -b ${graphite_version} --depth 1 ${graphite_repo} /usr/local/src/graphite-web \
114115
&& cd /usr/local/src/graphite-web \
115-
&& pip3 install -r requirements.txt \
116+
&& pip3 install --no-cache-dir -r requirements.txt \
116117
&& python3 ./setup.py install $python_extra_flags
117118

118119
# install statsd

0 commit comments

Comments
 (0)