HI, I’m new to dockers and I wanted to play around with a docker.
So far I have failed miserably…
I have a very simple app.jar file and this is my simple Dockerfile:
FROM openjdk:8-jre COPY . var/www/app WORKDIR var/www/app CMD ["java", "-jar", "app.jar"]
docker build -t java-app .
Image built successfully.
docker run -i -t java-app
I get the following error
Error response from daemon: OCI runtime create failed: container_linux.go:295: starting container process caused "exec: \"java\": executable file not found in $PATH": unknown.
I just followed simple instructions I found on the web. If I understand the error correctly, java isn’t recognised as a command despite Extending the OpenJDK image. Any help?