Skip to content
Advertisement

Build Docker Image with Java and Node.js together (Error : java: not found )

I’ve an API application that run both node and java files(jar) together. When I run the application locally it works, but once I create a docker image for it, I got an error from the postman .

JavaScript

I believe that I’m missing the jave configuration in docker file but I don’t know how to put the configuration for java and node together. any help will be appricatited!

Here is the Docker config.

JavaScript

Note: I’m using Temurin JDK

Advertisement

Answer

Maybe inside node:14.18.1 there is no java installed.

You have to add another step inside dockerfile:

RUN apk update && apk add openjdk(versionjdk)

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement