Having a Jenkins Docker image, I would like to add the complete 'npm' environment to that image. So after building the Dockerfile I have an image with both Jenkins and the 'npm' environment.
The purpose is that a Jenkins job to run the shell command 'npm'. So 'npm' should be on the $PATH (in Ubuntu).
I have already a Dockerfile with a lot stuff in there like Jenkins and Maven.
A solution for node was described in this post. The important thing is, can I do something simular? Which folders should I copy to the Jenkins docker image?
FROM node as nodejs
FROM jenkins/jenkins
// All kinds of other stuff goes here
COPY --from=nodejs /usr/local/bin/node /usr/local/bin/node ???
Installing 'npm' automatically within a Jenkins Global tool is not my preferred solution.