and I installed Kali Linux and enabled the docker environment, additionally, I was able to create an image using docker. But, when I run “docker run -p 8000:8080 name-of-image” it gives me an error saying:
“docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: “java”: executable file not found in $PATH: unknown.”
if you have any specific need of Ubuntu then you may need to install jdk on the image below are some sample can be used with base Ubuntu image
RUN apt install openjdk-11-jre-headless # version 11.0.11+9-0ubuntu2~20.04, or
RUN apt install default-jre # version 2:1.11-72
RUN apt install openjdk-13-jre-headless # version 13.0.7+5-0ubuntu1~20.04
RUN apt install openjdk-16-jre-headless # version 16.0.1+9-1~20.04
RUN apt install openjdk-8-jre-headless # version 8u292-b10-0ubuntu1~20.04
choose any version you want.
or choose any flavoured base image of Java you want.