diff --git a/docker_templates/base/Dockerfile.j2 b/docker_templates/base/Dockerfile.j2 index 7b498ed40b..807f3fe6ca 100755 --- a/docker_templates/base/Dockerfile.j2 +++ b/docker_templates/base/Dockerfile.j2 @@ -211,9 +211,12 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD libffi-dev \ libyaml-dev \ pkg-config \ - && apt-get clean + && apt-get clean \ + && sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \ + && rm -rf /usr/lib/python2.7/site-packages \ + && ln -s dist-packages /usr/lib/python2.7/site-packages - # Endif for install_type source +# Endif for base_distro ubuntu,debian {% endif %} {% if install_type == 'source' %}