When using container image "jenkins-agent-nodejs-8-rhel7", the npm executable isn't available at build time
Issue
When creating the following docker file from image jenkins-agent-nodejs-8-rhel7
:
FROM registry.redhat.io/openshift3/jenkins-agent-nodejs-8-rhel7
RUN npm
The build doesn't succeed because It doesn't have the npm
executable in the PATH:
$ docker build .
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM registry.redhat.io/openshift3/jenkins-agent-nodejs-8-rhel7
---> dcc6983d8503
Step 2/2 : RUN npm
---> Running in 7bc4975f9676
/bin/sh: npm: command not found
The command '/bin/sh -c npm' returned a non-zero code: 127
Environment
- Red Hat OpenShift Container Platform (OCP)
- Red Hat Container Images
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.