<div dir="ltr">Thanks Tomas.<div><br></div><div>Maybe my problem wasn't explained clearly enough. Apologies.</div><div><br></div><div>I like to use a base nodejs image that behaves more like the one available on docker hub <a href="https://hub.docker.com/_/node/">https://hub.docker.com/_/node/</a><br></div><div>as opposed to one that requires the sti tools.</div><div><br></div><div>e.g. I can use a Dockerfile like this to build a container for my app</div><div><br></div><div>```</div><div>FROM nodejs</div><div>ADD . /usr/src/app<br></div><div>```</div><div><br></div><div>then do a `docker build` and I have my image for my app.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 7:38 AM, Tomas Hrcka <span dir="ltr"><<a href="mailto:thrcka@redhat.com" target="_blank">thrcka@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/06/2015 05:08 PM, Honza Horak wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Adding Tomas into CC, he maintains nodejs and has better knowledge what it means to run nodejs app.<br>
<br>
My nodejs-unexperienced thought would be you can create a new docker image, that will use `FROM: nodejs-010-rhel7` and:<br>
* add the app code somewhere into the image (e.g. into /opt/app-root/app)<br>
* changing CMD to run your application on pure `docker run`<br>
<br>
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:<br>
<br>
#> docker run -v /your/app:/opt/app-root/app nodej-010-rhel7 /opt/app-root/app/run.sh<br>
<br>
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.<br>
<br>
Sharing also to the ML, maybe others might have different opinions/ideas or at least issues.<br>
<br>
Honza<br>
<br>
On 08/06/2015 03:42 PM, David Martin wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If there's a recommended way to use the sti nodejs image for simply<br>
running a node app, that'd be great.<br>
I'll spend some time trying to figure it out as I can't find Usage docs<br>
other than doing an sti build.<br>
</blockquote></blockquote>
<br></span>
Hi David,<br>
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<br>
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].<br>
<br>
<snip><br>
<br>
<br>
[1] - <a href="https://github.com/openshift/sti-base" rel="noreferrer" target="_blank">https://github.com/openshift/sti-base</a><br>
[2] - <a href="https://github.com/openshift/sti-nodejs" rel="noreferrer" target="_blank">https://github.com/openshift/sti-nodejs</a><br>
[3] - <a href="https://github.com/openshift/sti-nodejs/blob/master/0.10/.sti/bin/usage" rel="noreferrer" target="_blank">https://github.com/openshift/sti-nodejs/blob/master/0.10/.sti/bin/usage</a><span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Tomas Hrcka<br>
Software Engineer - Developer Experience<br>
<br>
</font></span></blockquote></div><br></div>