[scl.org] rhscl dockerfiles

Tomas Hrcka thrcka at redhat.com
Fri Aug 7 06:38:07 UTC 2015


On 08/06/2015 05:08 PM, Honza Horak wrote:
> Adding Tomas into CC, he maintains nodejs and has better knowledge 
> what it means to run nodejs app.
>
> My nodejs-unexperienced thought would be you can create a new docker 
> image, that will use `FROM: nodejs-010-rhel7` and:
> * add the app code somewhere into the image (e.g. into /opt/app-root/app)
> * changing CMD to run your application on pure `docker run`
>
> Or, theoretically, you don't have to create a new layer (image), just 
> use volume mounting to get your app into the container. It would mean 
> to run the image this way:
>
> #> docker run -v /your/app:/opt/app-root/app nodej-010-rhel7 
> /opt/app-root/app/run.sh
>
> But I may be also wrong about how it is the best to do it. Or whether 
> this way is something we should or shouldn't recommend.
>
> Sharing also to the ML, maybe others might have different 
> opinions/ideas or at least issues.
>
> Honza
>
> On 08/06/2015 03:42 PM, David Martin wrote:
>> If there's a recommended way to use the sti nodejs image for simply
>> running a node app, that'd be great.
>> I'll spend some time trying to figure it out as I can't find Usage docs
>> other than doing an sti build.

Hi David,
what I did when testing sti-nodejs, was that I have build sti-base[1] 
from scratch for rhel7. You will end up with openshift/base-rhel7
build sti-nodejs afterwards you will have openshift/nodejs-010-rhel7 in 
you local images list. Now you are ready to build&run your nodejs 
application image with sti, like explained in usage[3].

<snip>


[1] - https://github.com/openshift/sti-base
[2] - https://github.com/openshift/sti-nodejs
[3] - 
https://github.com/openshift/sti-nodejs/blob/master/0.10/.sti/bin/usage

-- 
Tomas Hrcka
Software Engineer - Developer Experience




More information about the SCLorg mailing list