diff --git a/runtimes/python2/Dockerfile b/runtimes/python2/Dockerfile index 7620169a..7051e980 100644 --- a/runtimes/python2/Dockerfile +++ b/runtimes/python2/Dockerfile @@ -7,11 +7,11 @@ RUN useradd -Ms /bin/bash qinling RUN apt-get update && \ apt-get -y install python-dev python-setuptools libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev python-pip && \ - pip install -U pip setuptools uwsgi + pip --no-cache-dir install -U pip setuptools uwsgi COPY . /app WORKDIR /app -RUN pip install --no-cache-dir -r requirements.txt && \ +RUN pip --no-cache-dir install -r requirements.txt && \ chmod 0750 custom-entrypoint.sh && \ mkdir /qinling_cgroup && \ mkdir -p /var/lock/qinling && \ diff --git a/runtimes/python3/Dockerfile b/runtimes/python3/Dockerfile index 35670e79..f5bcfb4b 100644 --- a/runtimes/python3/Dockerfile +++ b/runtimes/python3/Dockerfile @@ -7,11 +7,11 @@ RUN useradd -Ms /bin/bash qinling RUN apt-get update && \ apt-get -y install python3-dev python3-setuptools libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev python3-pip && \ - pip3 install -U pip setuptools uwsgi + pip3 --no-cache-dir install -U pip setuptools uwsgi COPY . /app WORKDIR /app -RUN pip install --no-cache-dir -r requirements.txt && \ +RUN pip --no-cache-dir install -r requirements.txt && \ chmod 0750 custom-entrypoint.sh && \ mkdir /qinling_cgroup && \ mkdir -p /var/lock/qinling && \ diff --git a/runtimes/sidecar/Dockerfile b/runtimes/sidecar/Dockerfile index 8d2b11c1..384f064c 100644 --- a/runtimes/sidecar/Dockerfile +++ b/runtimes/sidecar/Dockerfile @@ -7,12 +7,12 @@ RUN adduser -HDs /bin/sh qinling RUN apk update && \ apk add --no-cache linux-headers build-base python2 python2-dev py2-pip uwsgi-python uwsgi-http && \ - pip install --upgrade pip && \ + pip --no-cache-dir install --upgrade pip && \ rm -r /root/.cache COPY . /sidecar WORKDIR /sidecar -RUN pip install --no-cache-dir -r requirements.txt && \ +RUN pip --no-cache-dir install -r requirements.txt && \ mkdir -p /var/lock/qinling && \ mkdir -p /var/qinling/packages && \ chown -R qinling:qinling /sidecar /var/lock/qinling /var/qinling/packages diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index ea8e72ec..9ed53f62 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -23,9 +23,9 @@ RUN apt-get -qq update && \ libuv1-dev && \ curl -f -o /tmp/get-pip.py https://bootstrap.pypa.io/3.2/get-pip.py && \ python /tmp/get-pip.py && rm /tmp/get-pip.py && \ - pip install --upgrade pip + pip --no-cache-dir install --upgrade pip -RUN pip install pymysql psycopg2 py_mini_racer +RUN pip --no-cache-dir install pymysql psycopg2 py_mini_racer ENV QINLING_DIR="/opt/stack/qinling" \ TMP_CONSTRAINTS="/tmp/upper-constraints.txt" \ @@ -44,11 +44,11 @@ COPY requirements.txt "${QINLING_DIR}/" RUN curl -o "${TMP_CONSTRAINTS}" \ http://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt && \ sed -i "/^qinling.*/d" "${TMP_CONSTRAINTS}" && \ - pip install -r "${QINLING_DIR}/requirements.txt" + pip --no-cache-dir install -r "${QINLING_DIR}/requirements.txt" COPY . ${QINLING_DIR} -RUN pip install -e "${QINLING_DIR}" && \ +RUN pip --no-cache-dir install -e "${QINLING_DIR}" && \ mkdir /etc/qinling && \ rm -rf /var/lib/apt/lists/* && \ find ${QINLING_DIR} -name "*.sh" -exec chmod +x {} \;