title: How to create docker image with nodejs 12, java, gcc, g++,python3, monocs
body: <p>I am trying to dockerize my NodeJs &amp; Express API . In my API iam using <a href="https://www.npmjs.com/package/compile-run" rel="nofollow noreferrer">https://www.npmjs.com/package/compile-run</a> package to compile and run C,
  Cpp,Java,JavaScript(Node.js env), Python languages.
  This package requires all 5 compilers(gcc,g++,nodejs,python3,javac) installed on the server. If any compiler misses, it throws error.</p>
  <p>In my local(undockerized) the API is working completely fine on both windows &amp; ubuntu(As I have installed compilers on them).</p>
  <p>I am trying to replicate the same on my docker image. But I am stuck.</p>
  <p>Look at my
  <strong>Dockerfile</strong>:</p>
  <pre><code>FROM node:12
  WORKDIR /app
  COPY package.json /app
  RUN npm install
  COPY . /app
  CMD [&quot;npm&quot;,&quot;start&quot;]
  </code></pre>
  <p>I think node-12 image comes along with gcc, g++,python3 and nodejs(obviously).
  But the issue is with <strong>java</strong>. I am not able to compile java code.</p>
  <p>so I tried it this way</p>
  <pre><code>FROM node:12
  RUN apt-get -y install default-jre
  # RUN java -version
  RUN apt -y install default-jre
  RUN apt install openjdk-11-jre-headless
  RUN java -version
  
  WORKDIR /app
  
  
  COPY package.json /app
  RUN npm install
  COPY . /app
  CMD [&quot;npm&quot;,&quot;start&quot;]
  </code></pre>
  <p>But I am not able to install open-jdk or open-jre with apt/apt-get.
  What is the right way to configure docker?</p>
  <p>This is my nodeJS API repository <a href="https://github.com/yogendramaarisetty/online-compiler-api" rel="nofollow noreferrer">https://github.com/yogendramaarisetty/online-compiler-api</a></p>