I have been working with Spring boot and Docker. I used to build docker image of applications on JAVA 8. But now i need to build the docker image of application that use JAVA 11. Please guide me about this.
Dockerfile
FROM openjdk:8u121-jdk-alpine
ENV APP_JAR_NAME applicationTest
RUN apk --update add curl bash &&
rm -rf /var/cache/apk/*
RUN mkdir /app
ADD ${APP_JAR_NAME}.jar /app/
ADD run.sh /app/
RUN chmod +x /app/run.sh
WORKDIR /app
EXPOSE 8080
ENTRYPOINT ["/bin/bash","-c"]
CMD ["/app/run.sh"]
Request please share the Dockerfile that i could used for building docker image of JAVA 11
Just change version (FROM) to adoptopenjdk/openjdk11, from the Overview:
FROM adoptopenjdk/openjdk11:latest
RUN mkdir /opt/app
COPY japp.jar /opt/app
CMD ["java", "-jar", "/opt/app/japp.jar"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With