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:
parent
dbc6799c3a
commit
421a71e145
@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/env python
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2011, 2013-2014 OpenStack Foundation
|
# Copyright 2011, 2013-2014 OpenStack Foundation
|
||||||
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
||||||
|
@ -33,4 +33,4 @@ mkdir -p /data/ssh
|
|||||||
# Template the config file (which can also be root-owned)
|
# Template the config file (which can also be root-owned)
|
||||||
export JINJA_SRC_FILE=/config_src/app.ini.j2
|
export JINJA_SRC_FILE=/config_src/app.ini.j2
|
||||||
export JINJA_DEST_FILE=/conf/app.ini
|
export JINJA_DEST_FILE=/conf/app.ini
|
||||||
python /run.py
|
python3 /run.py
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
|
# Copyright (C) 2015 Hewlett-Packard Development Company, L.P.
|
||||||
#
|
#
|
||||||
|
@ -31,4 +31,4 @@ RUN pip install jinja2
|
|||||||
|
|
||||||
COPY --from=build /src/jinja-init/run.py /
|
COPY --from=build /src/jinja-init/run.py /
|
||||||
|
|
||||||
ENTRYPOINT ["python", "/run.py"]
|
ENTRYPOINT ["python3", "/run.py"]
|
||||||
|
@ -51,7 +51,7 @@ function install_wheels {
|
|||||||
# in the output dir and not the wheel cache, so it's not
|
# in the output dir and not the wheel cache, so it's not
|
||||||
# possible to tell what is the wheel for the project and
|
# possible to tell what is the wheel for the project and
|
||||||
# what is the wheel cache.
|
# 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
|
# Install everything so that the wheel cache is populated with
|
||||||
# transitive depends. If a requirements.txt file exists, install
|
# 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
|
# Use a clean virtualenv for install steps to prevent things from the
|
||||||
# current environment making us not build a wheel.
|
# 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
|
/tmp/venv/bin/pip install -U pip wheel
|
||||||
|
|
||||||
# If there is an upper-constraints.txt file in the source tree,
|
# If there is an upper-constraints.txt file in the source tree,
|
||||||
|
Loading…
Reference in New Issue
Block a user