Comments (5)
Probably caused by the entrypoint override changes. Previously we would
have been running the base image entrypoint script (which probably
specifies bash) with the assemble script as the arg. Now we're not. So
you're going to have to use bash, or enable it yourself. The tricks we use
to enable it don't work with sh (even when sh is a symlink to bash, the
behavior changes)
https://github.com/openshift/s2i-base/blob/master/bin/container-entrypoint
Ben Parees | OpenShift
On Aug 11, 2016 00:44, "Graham Dumpleton" [email protected] wrote:
Am trying the latest all-in-one VM we have based on 1.1.3 alpha 3 and
there is a change in behaviour around builds. Don't know if this is because
a change in s2i used, the S2I builder image I am using as base, or even
some CentOS package.I am using sourceStrategy.scripts to override default S2I scripts and
pull in versions from a HTTP server.Previously when the assemble script pulled in this way was using /bin/sh
in #! line, then the scl_enable would be triggered by virtue of the ENV,
BASH_ENV or PROMPT_COMMAND hack. This is no longer occurring so the SCL
bin directory for Python is not in the path.I can see that not right by adding env to start of assemble script. When
#! uses /bin/sh I see:HOSTNAME=wagtail-4-build
OPENSHIFT_BUILD_NAME=wagtail-4
OPENSHIFT_BUILD_SOURCE=https://github.com/GrahamDumpleton/openshift3-wagtail.git
ENV=/opt/app-root/etc/scl_enable
PYTHON_VERSION=2.7
PATH=/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPENSHIFT_BUILD_NAMESPACE=snakes
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
OPENSHIFT_BUILD_REFERENCE=master
HOME=/opt/app-root/src
SHLVL=2
WARPDRIVE_DEBUG=true
BASH_ENV=/opt/app-root/etc/scl_enable https://github.com/GrahamDumpleton/openshift3-wagtail.gitENV=/opt/app-root/etc/scl_enablePYTHON_VERSION=2.7PATH=/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binOPENSHIFT_BUILD_NAMESPACE=snakesSTI_SCRIPTS_URL=image:///usr/libexec/s2iPWD=/opt/app-root/srcSTI_SCRIPTS_PATH=/usr/libexec/s2iOPENSHIFT_BUILD_REFERENCE=masterHOME=/opt/app-root/srcSHLVL=2WARPDRIVE_DEBUG=trueBASH_ENV=/opt/app-root/etc/scl_enable
PROMPT_COMMAND=. /opt/app-root/etc/scl_enable
_=/usr/bin/envNote how ENV, BASH_ENV and PROMPT_COMMAND are still set and PATH doesn't
include SCL bin directory for Python, nor the LD_LIBRARY_PATH change.If I modify the assemble script so that uses /bin/bash, then it all works
again and env at start of script shows:MANPATH=/opt/rh/python27/root/usr/share/man:
HOSTNAME=wagtail-5-build
OPENSHIFT_BUILD_NAME=wagtail-5
X_SCLS=python27
OPENSHIFT_BUILD_SOURCE=https://github.com/GrahamDumpleton/openshift3-wagtail.git
LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64
PYTHON_VERSION=2.7
PATH=/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPENSHIFT_BUILD_NAMESPACE=snakes
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
OPENSHIFT_BUILD_REFERENCE=master
HOME=/opt/app-root/src
SHLVL=2
WARPDRIVE_DEBUG=true
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share:/usr/local/share:/usr/share
PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig
_=/usr/bin/env https://github.com/GrahamDumpleton/openshift3-wagtail.gitLD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64PYTHON_VERSION=2.7PATH=/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binOPENSHIFT_BUILD_NAMESPACE=snakesSTI_SCRIPTS_URL=image:///usr/libexec/s2iPWD=/opt/app-root/srcSTI_SCRIPTS_PATH=/usr/libexec/s2iOPENSHIFT_BUILD_REFERENCE=masterHOME=/opt/app-root/srcSHLVL=2WARPDRIVE_DEBUG=trueXDG_DATA_DIRS=/opt/rh/python27/root/usr/share:/usr/local/share:/usr/sharePKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig_=/usr/bin/envSo the environment variables to trigger scl_enable have been removed as
expected, plus the PATH and LD_LIBRARY_PATH changes.What would have changed such that the ENV, BASH_ENV and PROMPT_COMMAND
hack would no longer work when assemble uses /bin/sh rather than /bin/bash
?If this doesn't work for assemble, this may mean that the hack for
triggering scl_enable may not work either for case where using oc rsh or oc
exec with a program implemented as a /bin/sh script. I haven't test this
case but needs to be checked as well as work out why assemble now can
only use /bin/bash.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#139, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AEvl3vzKEpo2QuoNrOyi9B9FeFD6l3lFks5qeqicgaJpZM4Jhywh
.
from s2i-python-container.
Oc rsh should be fine because it starts an interactive shell. Oc exec may
or may not be, but that hasn't changed.
Ben Parees | OpenShift
On Aug 11, 2016 00:58, "Ben Parees" [email protected] wrote:
Probably caused by the entrypoint override changes. Previously we would
have been running the base image entrypoint script (which probably
specifies bash) with the assemble script as the arg. Now we're not. So
you're going to have to use bash, or enable it yourself. The tricks we use
to enable it don't work with sh (even when sh is a symlink to bash, the
behavior changes)https://github.com/openshift/s2i-base/blob/master/bin/container-entrypoint
Ben Parees | OpenShift
On Aug 11, 2016 00:44, "Graham Dumpleton" [email protected]
wrote:Am trying the latest all-in-one VM we have based on 1.1.3 alpha 3 and
there is a change in behaviour around builds. Don't know if this is because
a change in s2i used, the S2I builder image I am using as base, or even
some CentOS package.I am using sourceStrategy.scripts to override default S2I scripts and
pull in versions from a HTTP server.Previously when the assemble script pulled in this way was using /bin/sh
in #! line, then the scl_enable would be triggered by virtue of the ENV,
BASH_ENV or PROMPT_COMMAND hack. This is no longer occurring so the SCL
bin directory for Python is not in the path.I can see that not right by adding env to start of assemble script. When
#! uses /bin/sh I see:HOSTNAME=wagtail-4-build
OPENSHIFT_BUILD_NAME=wagtail-4
OPENSHIFT_BUILD_SOURCE=https://github.com/GrahamDumpleton/openshift3-wagtail.git
ENV=/opt/app-root/etc/scl_enable
PYTHON_VERSION=2.7
PATH=/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPENSHIFT_BUILD_NAMESPACE=snakes
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
OPENSHIFT_BUILD_REFERENCE=master
HOME=/opt/app-root/src
SHLVL=2
WARPDRIVE_DEBUG=true
BASH_ENV=/opt/app-root/etc/scl_enable https://github.com/GrahamDumpleton/openshift3-wagtail.gitENV=/opt/app-root/etc/scl_enablePYTHON_VERSION=2.7PATH=/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binOPENSHIFT_BUILD_NAMESPACE=snakesSTI_SCRIPTS_URL=image:///usr/libexec/s2iPWD=/opt/app-root/srcSTI_SCRIPTS_PATH=/usr/libexec/s2iOPENSHIFT_BUILD_REFERENCE=masterHOME=/opt/app-root/srcSHLVL=2WARPDRIVE_DEBUG=trueBASH_ENV=/opt/app-root/etc/scl_enable
PROMPT_COMMAND=. /opt/app-root/etc/scl_enable
_=/usr/bin/envNote how ENV, BASH_ENV and PROMPT_COMMAND are still set and PATH doesn't
include SCL bin directory for Python, nor the LD_LIBRARY_PATH change.If I modify the assemble script so that uses /bin/bash, then it all
works again and env at start of script shows:MANPATH=/opt/rh/python27/root/usr/share/man:
HOSTNAME=wagtail-5-build
OPENSHIFT_BUILD_NAME=wagtail-5
X_SCLS=python27
OPENSHIFT_BUILD_SOURCE=https://github.com/GrahamDumpleton/openshift3-wagtail.git
LD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64
PYTHON_VERSION=2.7
PATH=/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPENSHIFT_BUILD_NAMESPACE=snakes
STI_SCRIPTS_URL=image:///usr/libexec/s2i
PWD=/opt/app-root/src
STI_SCRIPTS_PATH=/usr/libexec/s2i
OPENSHIFT_BUILD_REFERENCE=master
HOME=/opt/app-root/src
SHLVL=2
WARPDRIVE_DEBUG=true
XDG_DATA_DIRS=/opt/rh/python27/root/usr/share:/usr/local/share:/usr/share
PKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig
_=/usr/bin/env https://github.com/GrahamDumpleton/openshift3-wagtail.gitLD_LIBRARY_PATH=/opt/rh/python27/root/usr/lib64PYTHON_VERSION=2.7PATH=/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binOPENSHIFT_BUILD_NAMESPACE=snakesSTI_SCRIPTS_URL=image:///usr/libexec/s2iPWD=/opt/app-root/srcSTI_SCRIPTS_PATH=/usr/libexec/s2iOPENSHIFT_BUILD_REFERENCE=masterHOME=/opt/app-root/srcSHLVL=2WARPDRIVE_DEBUG=trueXDG_DATA_DIRS=/opt/rh/python27/root/usr/share:/usr/local/share:/usr/sharePKG_CONFIG_PATH=/opt/rh/python27/root/usr/lib64/pkgconfig_=/usr/bin/envSo the environment variables to trigger scl_enable have been removed as
expected, plus the PATH and LD_LIBRARY_PATH changes.What would have changed such that the ENV, BASH_ENV and PROMPT_COMMAND
hack would no longer work when assemble uses /bin/sh rather than
/bin/bash?If this doesn't work for assemble, this may mean that the hack for
triggering scl_enable may not work either for case where using oc rsh or oc
exec with a program implemented as a /bin/sh script. I haven't test this
case but needs to be checked as well as work out why assemble now can
only use /bin/bash.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#139, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AEvl3vzKEpo2QuoNrOyi9B9FeFD6l3lFks5qeqicgaJpZM4Jhywh
.
from s2i-python-container.
In this case I am using the openshift/python
images. I am not using my own images defining an Entrypoint
. I thought the changes would only kick in if Entrypoint
was actually used, or is it because of some implicit Entrypoint
that is always returned for Docker images, that the change is always kicking in?
from s2i-python-container.
if by openshift/python you mean openshift/python-33-centos7 or centos/python-34-centos7, etc, then thsoe images all define an entrypoint they inherit from the base image:
https://github.com/openshift/s2i-base/blob/master/Dockerfile#L80
which is the entrypoint script i was talking about that runs bash. (and is no longer being invoked thanks to the changes to override the entrypoint when invoking assemble).
from s2i-python-container.
Closing this on basis that is a requirement that custom assemble
and run
scripts best use bash
.
from s2i-python-container.
Related Issues (20)
- No Action Required !! Testing automation workflow HOT 1
- No Action Required !! Testing automation workflow HOT 4
- Remove verification of installed packages HOT 3
- 3.9 Readme Instructions unclear HOT 6
- Python 3.10 RHEL image missing in RHEL Container catalog? HOT 4
- Unable to build a Python image from scratch on MacOS HOT 1
- Python 3.9+ for Centos 7 docker images HOT 4
- tests: test case should fail early when the prepare function fails HOT 3
- Distgen errors HOT 11
- Incorrect py-3 image HOT 11
- Support gunicorn >=20.1.0 defaults (do not require APP_ environment variables) HOT 1
- Add RHEL images for Python 3.11 HOT 4
- ERROR: No matching distribution found for numpy==1.19.2 HOT 4
- Use PIP_INDEX_URL with pipenv HOT 1
- ubi9/python-311:latest is using python3.9-rpm HOT 2
- Publish arm64 images HOT 8
- rh-python38 failed on `'npm-virtualenv-uwsgi-test-app' run_s2i_build` & `'pin-pipenv-version-test-app' run_s2i_build` HOT 2
- python311-devel not found by microdnf in python 3.11 minimal EL8 and C9s variants HOT 1
- Documented pull example quay.io/sclorg/python-39-minimal isn't a valid URL HOT 5
- Cannot resolve internal host HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s2i-python-container.