I have written a docker file, to config jenkins, node, npm and awscli. I want to add java 8 to this docker file, so that i can use java version 8 inside Jenkins. Below is my dockerfile
FROM jenkins/jenkins
USER root
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y nodejs
RUN curl -L https://www.npmjs.com/install.sh | sh
RUN apt-get update && apt-get install -y awscli
RUN npm install -g serverless
USER jenkins
I tried adding various images but none of them seems to be working, or it is deprecated
What can I add to add java 8 here.
The Jenkins image already has a version of Java installed. We'll install Java 8 as well and set up the path for the
jenkinsuser to use it. I'm not sure what impact this will have on the functionality of Jenkins, but it does what you have asked.DockerfileOpenJDK version 1.8.0 indicates Java 8.