Use --no-cache-dir flag to pip in Dockerfiles, to save space (#26978)

Use `--no-cache-dir` flag to `pip` in Dockerfiles, to save space

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
This commit is contained in:
Pratik Raj 2020-08-13 13:34:31 +05:30 committed by GitHub
parent 9f159c5e3d
commit 3bed3248d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ ADD etc_mtab /etc/mtab
ADD collectd.conf.tpl /etc/collectd/collectd.conf.tpl
RUN pip install envtpl
RUN pip install --no-cache-dir envtpl
ADD start_container /usr/bin/start_container
RUN chmod +x /usr/bin/start_container
CMD start_container

View File

@ -35,7 +35,7 @@ RUN if [ ! -z "${CONTAINER_TIMEZONE}" ]; \
# fix python dependencies (LTS Django and newer memcached/txAMQP)
RUN pip install --upgrade pip && \
pip install django==1.8.18 \
pip install --no-cache-dir django==1.8.18 \
python-memcached==1.53 \
txAMQP==0.6.2
@ -62,13 +62,13 @@ RUN python ./setup.py install
# install carbon
RUN git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon
WORKDIR /usr/local/src/carbon
RUN pip install -r requirements.txt \
RUN pip install --no-cache-dir -r requirements.txt \
&& python ./setup.py install
# install graphite
RUN git clone -b ${graphite_version} --depth 1 ${graphite_repo} /usr/local/src/graphite-web
WORKDIR /usr/local/src/graphite-web
RUN pip install -r requirements.txt \
RUN pip install --no-cache-dir -r requirements.txt \
&& python ./setup.py install
# install statsd