DEV Community

Rahul Raj
Rahul Raj

Posted on

Docker compose install jdk 8 even though jdk 11 is mentioned in Dockerfile

I need to create a docker container for my app with JDK 11 installed. My docker file looks like below:

ARG env_=local
FROM openjdk:11-jdk
LABEL maintainer=myapp artifact=pro-web-admin
ENV ENV_NAME=$env_
EXPOSE 9090
ENV USER root
ADD build/libs/pro-web-admin-0.0.1-SNAPSHOT.jar pro-web-admin.jar
ENTRYPOINT ["java","-jar","/pro-web-admin.jar"]

And my docker-compose.yml looks like below:

version: '3.8'
services
  postgresqldb:
    image:

Top comments (1)

Collapse
 
rahulraj profile image
Rahul Raj

Can someone help me out how this is happening?