The best way for you is to take java (which is officially deprecated and suggests using the openjdk image) and install node in it.
So start with
FROM openjdk:latest
At this time, the latest openjdk image, which is 8u151 , will be used. Then install node and other dependencies you may need:
RUN apt-get install -y curl \ && curl -sL https://deb.nodesource.com/setup_9.x | bash - \ && apt-get install -y nodejs \ && curl -L https://www.npmjs.com/install.sh | sh
You might want to install things like grunt, so this might come in handy.
RUN npm install -g grunt grunt-cli
In total, you will receive the following Docker file:
FROM openjdk:latest RUN apt-get install -y curl \ && curl -sL https://deb.nodesource.com/setup_9.x | bash - \ && apt-get install -y nodejs \ && curl -L https://www.npmjs.com/install.sh | sh \ RUN npm install -g grunt grunt-cli
You can clone the Docker file from my github repo here
source share