> On 24 May 2018, at 7:20 am, Brian Keyes <[email protected]> wrote:
> 
> I want to use a custom image that has alpline with python and boto3 installed 
> on it
> 
> I am seeing the console might have some way to do this , but I am not sure on 
> the procedure at all
> 
> would I , create a docker contaner , install boto3 manually , commit that to 
> an image and somehow get that image into openshift , maybe pull from dockerhub
> 
> any advice would be helpfull

I would recommend against using an Alpine based images. The benefits of using 
an Alpine image are overrated and you actually loose a lot by using them as it 
lacks tools you would need to debug your application when you have problems.

Running up a container and getting as interactive terminal in it, manually 
installing packages, and then stopping it and committing it is also not a good 
practice as it can't be automated and placed under version control.

For OpenShift what you want to research is the Source to Image (S2I) builders. 
This allows you to put your application source code for your web application 
into a Git repo, along with a requirements.txt file which lists what Python 
packages that need to be installed. An S2I build can then be set up in 
OpenShift which points to the repo and OpenShift will pull down the repo, 
automatically install any packages listed in requirements.txt, and set up your 
image so that when it is deployed, the web application is run.

An example of such a repo is:

https://github.com/OpenShiftDemos/os-sample-python 
<https://github.com/OpenShiftDemos/os-sample-python>

To learn more about deploying applications to OpenShift, using S2I, I would 
suggest you read:

https://www.openshift.com/for-developers/ 
<https://www.openshift.com/for-developers/>
https://www.openshift.com/deploying-to-openshift/ 
<https://www.openshift.com/deploying-to-openshift/>

Reading those will save you a lot of trial and error around working out how to 
use OpenShift.

Graham
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to