Use Dockerfile customization instead of include_header

include_header is marked deprecated and will be removed in the future

Change-Id: I170f7657bebe99f31b04c2c80f5a1c0dbd58000f
This commit is contained in:
Jeffrey Zhang committed 2016-11-29 15:09:39 +08:00
1 parent 06ff52553e
commit 0099de4841
1 file changed
+6 -3
+6 -3
View File
@@ -34,10 +34,13 @@ timeout = 60
index-url = $NODEPOOL_PYPI_MIRROR
trusted-host = $NODEPOOL_MIRROR_HOST
EOF
echo "RUN echo $(base64 -w0 ${PIP_CONF}) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header
rm ${PIP_CONF}
sed -i 's|^#include_header.*|include_header = /etc/kolla/header|' /etc/kolla/kolla-build.conf
cat > /etc/kolla/template-override.j2 <<EOF
{% block header %}
RUN echo $(base64 -w0 ${PIP_CONF}) | base64 -d > /etc/pip.conf
{% endblock %}
EOF
rm ${PIP_CONF}
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
sed -i 's|^#namespace.*|namespace = lokolla|' /etc/kolla/kolla-build.conf