Be explicit about using python3 in docker images

Our docker python-base image is a python3 image where python and python3
point to the same version of python which happens to be a 3.x depending
on the specific base image.

One of the things that came up at the PTG is that we'd like to start
identifying where we use python2 in order to port to python3. That is
made a bit more difficult when we use `python` assuming it is `python3`
as we do in our docker images.

Update the images to use `python3` to make this a lot more explicit and
clear that we don't need to port these items.

Change-Id: I54e8f128f0cb8fbbdf54e3748384470262bef3a9
This commit is contained in:
Clark Boylan 2020-06-09 09:30:56 -07:00
parent dbc6799c3a
commit 421a71e145
6 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python3
# Copyright 2011, 2013-2014 OpenStack Foundation
# Copyright 2012 Hewlett-Packard Development Company, L.P.

View File

@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
exec python /usr/local/bin/accessbot.py -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1
exec python3 /usr/local/bin/accessbot.py -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1

View File

@ -33,4 +33,4 @@ mkdir -p /data/ssh
# Template the config file (which can also be root-owned)
export JINJA_SRC_FILE=/config_src/app.ini.j2
export JINJA_DEST_FILE=/conf/app.ini
python /run.py
python3 /run.py

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
#

View File

@ -31,4 +31,4 @@ RUN pip install jinja2
COPY --from=build /src/jinja-init/run.py /
ENTRYPOINT ["python", "/run.py"]
ENTRYPOINT ["python3", "/run.py"]

View File

@ -51,7 +51,7 @@ function install_wheels {
# in the output dir and not the wheel cache, so it's not
# possible to tell what is the wheel for the project and
# what is the wheel cache.
python setup.py sdist bdist_wheel -d /output/wheels
python3 setup.py sdist bdist_wheel -d /output/wheels
# Install everything so that the wheel cache is populated with
# transitive depends. If a requirements.txt file exists, install
@ -87,7 +87,7 @@ done
# Use a clean virtualenv for install steps to prevent things from the
# current environment making us not build a wheel.
python -m venv /tmp/venv
python3 -m venv /tmp/venv
/tmp/venv/bin/pip install -U pip wheel
# If there is an upper-constraints.txt file in the source tree,