Merge pull request #614 from SDN-Projects/optimization/pip-no-cache-dir

chore : use --no-cache-dir flag to pip in dockerfiles to save space
This commit is contained in:
Jeremy Grossmann 2021-09-23 10:01:05 +09:30 committed by GitHub
commit 7431c299dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
FROM python:2.7
RUN pip install jupyter
RUN pip install --no-cache-dir jupyter
ADD jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py

View File

@ -1,6 +1,6 @@
FROM python:3.7.7
RUN pip3 install jupyter
RUN pip3 install --no-cache-dir jupyter
ADD jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py

View File

@ -9,9 +9,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y --no-install-rec
&& apt-add-repository -y ppa:ansible/ansible-2.8 \
&& apt-get update && apt-get -y --no-install-recommends install ansible \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install wheel \
&& pip3 install cryptography netmiko napalm pyntc \
&& pip3 install --upgrade paramiko && mkdir /scripts \
&& pip3 install --no-cache-dir wheel \
&& pip3 install --no-cache-dir cryptography netmiko napalm pyntc \
&& pip3 install --no-cache-dir --upgrade paramiko && mkdir /scripts \
&& mkdir /root/.ssh/ \
&& echo "KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1" > /root/.ssh/config \
&& echo "Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr" >> /root/.ssh/config \

View File

@ -34,11 +34,11 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
software-properties-common \
&& apt-add-repository -y ppa:ansible/ansible \
&& apt-get update && apt-get -y --no-install-recommends install ansible \
&& pip install --upgrade pip \
&& pip install cryptography netmiko napalm pyntc \
&& pip install --upgrade paramiko \
&& pip install pexpect \
&& pip install docopt==0.6.2 sh
&& pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir cryptography netmiko napalm pyntc \
&& pip install --no-cache-dir --upgrade paramiko \
&& pip install --no-cache-dir pexpect \
&& pip install --no-cache-dir docopt==0.6.2 sh
RUN export JAVA_HOME=/usr/lib/jvm/default-java