[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: boto import command not found

The 'run' file must be an executable application.

For a shell script, that means it must start with:


Thus you should be using:


    python /opt/app-root/src/.s2i/bin/app.py

You also should not be putting your 'app.py' file in the '.s2i/bin' directory. It should be in the root of the repo. That way it will be automatically copied to:


for you.

The question is though why you are even overriding the 'run' script. You can remove it as written, place your 'app.py' file in the root of the repo and the Python S2I will automatically find it in the /opt/app-root/src directory of the container and run it with Python for you.

I believe I already referred you to:


where the behaviour of the S2I builder image is explained.

You shouldn't usually need to override either 'assemble' or 'run' if you use the S2I images as intended.


On 5 Jun 2018, at 4:22 am, Brian Keyes <bkeyes vizuri com> wrote:

I have a script that is running fine locally on my MAC , to run this script on my MAC i just have to run the command "python run" ( run the the name of my file ) and it will run fine 

I have created a git hub repo at  github.com/brikeyes/os-sample-python.git and placed this working python file in the required path in github  (os-sample-python/.s2i/bin)

when I run this in openshift I get this error 

"/tmp/scripts/run: line 1: import: command not found "

I get this also if I run it locally and do not include the word python in the command like ./run , so I need to let it know how to run the script by inserting the word " phython " right before it executes .s2i/bin/run 

I know I have python installed as it is in the requrements.txt file in git hub ,

thanks !
users mailing list
users lists openshift redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]