<div dir="ltr">Thanks Tomas,<div><br></div><div>I got something working with this</div><div><br></div><div>```</div><div><div>FROM <a href="http://registry.access.redhat.com/openshift3/nodejs-010-rhel7">registry.access.redhat.com/openshift3/nodejs-010-rhel7</a></div><div><br></div><div># Extract app to work dir<br></div><div>....</div><div># Other setup stuff</div><div>...</div><div><br></div><div>CMD source /opt/openshift/etc/scl_enable; npm start</div></div><div>```</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 7, 2015 at 11:54 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">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <br>
    <br>
    <div>On 08/07/2015 11:07 AM, David Martin
      wrote:<br>
    </div>
    <blockquote type="cite">
      <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/" target="_blank">https://hub.docker.com/_/node/</a><br>
        </div>
        <div>as opposed to one that requires the sti tools.</div>
      </div>
    </blockquote>
    <br></span>
    You can use the sti tools just to build the nodejs010 base image.<br>
    Or pull it from internal registry
    <a href="http://registry.access.redhat.com/openshift3/nodejs-010-rhel7" target="_blank">registry.access.redhat.com/openshift3/nodejs-010-rhel7</a><span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <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>
    </blockquote></span>
    and build your app using appropriate tag in FROM<div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <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>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/<a>app:/opt/app-root/app</a>
                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><font color="#888888"><br>
                <br>
                -- <br>
                Tomas Hrcka<br>
                Software Engineer - Developer Experience<br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>