Merge "docker: use python3-venv to create virtual env"
This commit is contained in:
commit
9a8a8aa1b3
@ -48,13 +48,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
'libxslt1-dev',
|
||||
'openvswitch-switch',
|
||||
'python3-dev',
|
||||
'python3-venv',
|
||||
'rabbitmq-server',
|
||||
] %}
|
||||
{% endif %}
|
||||
{{ macros.install_packages(kolla_toolbox_packages | customizable("packages")) }}
|
||||
|
||||
{% set kolla_toolbox_pip_virtualenv_packages = [
|
||||
'virtualenv'
|
||||
] %}
|
||||
|
||||
{% block kolla_toolbox_upper_constraints %}
|
||||
@ -62,7 +62,7 @@ RUN mkdir -p /requirements \
|
||||
&& curl -o /requirements/upper-constraints.txt ${UPPER_CONSTRAINTS_FILE:-https://releases.openstack.org/constraints/upper/{{ openstack_release }}} \
|
||||
&& sed -e "/^openstacksdk/d" -i /requirements/upper-constraints.txt \
|
||||
&& {{ macros.install_pip(kolla_toolbox_pip_virtualenv_packages | customizable("pip_virtualenv_packages")) }} \
|
||||
&& virtualenv --system-site-packages {{ virtualenv_path }}
|
||||
&& python3 -m venv --system-site-packages {{ virtualenv_path }}
|
||||
{% endblock %}
|
||||
|
||||
ENV PATH {{ virtualenv_path }}/bin:$PATH
|
||||
|
@ -50,6 +50,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
'libz-dev',
|
||||
'pkg-config',
|
||||
'python3-dev',
|
||||
'python3-venv',
|
||||
'zip'
|
||||
] %}
|
||||
|
||||
@ -191,8 +192,7 @@ RUN ln -s openstack-base-source/* /requirements \
|
||||
#}
|
||||
&& sed -i /^ovs=/d /requirements/upper-constraints.txt \
|
||||
&& mkdir -p /var/lib/kolla \
|
||||
&& {{ macros.install_pip(['virtualenv'])}} \
|
||||
&& virtualenv --system-site-packages /var/lib/kolla/venv
|
||||
&& python3 -m venv --system-site-packages /var/lib/kolla/venv
|
||||
|
||||
ENV PATH /var/lib/kolla/venv/bin:$PATH
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user