Hi Jose,
thanks for the report! You are correct, the definitions should be in
different ENV commands. I created a PR against sclorg repository:
https://github.com/sclorg/s2i-nodejs-container/pull/309
Petr
On 12/10/21 11:37 PM, Jose Gonzalez wrote:
Hi there!
I attempted to use the ubi8/nodejs-16-minimal image
(https://catalog.redhat.com/software/containers/ubi8/nodejs-16-minimal/615aefd53f6014fa45ae1ae2
<https://catalog.redhat.com/software/containers/ubi8/nodejs-16-minimal/615aefd53f6014fa45ae1ae2>)
and couldn't seem to get the PATH to refer to the appropriate $HOME
location. The result is that the node_modules paths are all relative
to root ("/") instead of relative to the /opt/app-root/src path
$ docker run -it
registry.access.redhat.com/ubi8/nodejs-16-minimal:latest
<http://registry.access.redhat.com/ubi8/nodejs-16-minimal:latest>
printenv PATH
/node_modules/.bin/:/.npm-global/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
In testing on my machine, it seems to be because the HOME variable and
the PATH variable are declared in the same ENV action. Separating them
resolved this for me, though it seems like it should have worked as
expected.
Either way, I wanted to report it to see if there was something that I
could do to resolve this, or if there was simply an error in how I was
using this image.
Regards,
José R. González
Red Hat | Partner Lifecycle Engineering
_______________________________________________
SCLorg mailing list
SCLorg@redhat.com
https://listman.redhat.com/mailman/listinfo/sclorg
_______________________________________________
SCLorg mailing list
SCLorg@redhat.com
https://listman.redhat.com/mailman/listinfo/sclorg