diff --git a/docker/kolla-ansible/Dockerfile.j2 b/docker/kolla-ansible/Dockerfile.j2
index fe80db6936ef6afc8bfde76d84948a5fb0572f96..5f67010fa2069e0148f31bf8938c950cc7851ec9 100644
--- a/docker/kolla-ansible/Dockerfile.j2
+++ b/docker/kolla-ansible/Dockerfile.j2
@@ -33,9 +33,15 @@ RUN apt-get -y --no-install-recommends install \
 
 {% endif %}
 
+# TODO(jeffrey4l): Pin the pip to the 7.1.2. version. latest pip
+# (now 8.0) can not install the package when conflict with the
+# system. The best solution should use the virtualenv for
+# isolation or following bug is fixed:
+# https://github.com/pypa/pip/pull/3389
 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
     && python get-pip.py \
     && rm get-pip.py \
+    && pip install pip==7.1.2 \
     && pip --no-cache-dir install --upgrade wheel \
     && pip --no-cache-dir install \
         MySQL-python \
diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2
index d81e49006f5e2392b63ea0a2cd919d0aaa4c9123..de111a94a09e622087a670fa95b79bad416c8ad7 100644
--- a/docker/openstack-base/Dockerfile.j2
+++ b/docker/openstack-base/Dockerfile.j2
@@ -105,13 +105,20 @@ RUN apt-get install -y --no-install-recommends \
     {% endif %}
 
 ADD openstack-base-archive /openstack-base-source
+# TODO(jeffrey4l): Pin the pip to the 7.1.2. version. latest pip
+# (now 8.0) can not install the package when conflict with the
+# system. The best solution should use the virtualenv for
+# isolation or following bug is fixed:
+# https://github.com/pypa/pip/pull/3389
 RUN ln -s openstack-base-source/* /requirements \
     && mkdir /var/lib/kolla \
     && curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
     && python get-pip.py \
     && rm get-pip.py \
+    && pip install pip==7.1.2 \
     && pip --no-cache-dir install -U virtualenv \
     && virtualenv --system-site-packages /var/lib/kolla/venv \
+    && /var/lib/kolla/venv/bin/pip --no-cache-dir install pip==7.1.2 \
     && /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt \
         jinja2 \
         kazoo \