Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : use --no-cache-dir flag to pip in dockerfiles to save space #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN true \
&& virtualenv -p python3 /opt/graphite \
&& . /opt/graphite/bin/activate \
&& echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so \
&& pip install \
&& pip install --no-cache-dir \
cairocffi==1.1.0 \
django==4.2.15 \
django-tagging==0.5.0 \
Expand All @@ -94,6 +94,7 @@ ARG whisper_repo=https://github.com/graphite-project/whisper.git
RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whisper \
&& cd /usr/local/src/whisper \
&& . /opt/graphite/bin/activate \
&& pip3 install --no-cache-dir -r requirements.txt \
&& python3 ./setup.py install $python_extra_flags

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

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

# install statsd
Expand Down