Minimal OpenJDK JRE
Based in alpine image, and with nothing more than Java OpenJDK Runtime libraries installed, this image offers a minimalistic and simple way to run your Java based app.
Java 7 & 8
Both versions are available and ready to be use. Use one of the following tags to choose witch one to use:
How to Run
Let's start with a simple run
$ docker run -i 123software/openjdk-jre:7u91 java -version
But of course, you would't be interested in a Java image that only thing it does is return a java version, so, here is an example of how to execute a jar file.
Create a Dockerfile like following:
FROM 123software/openjdk-jre:7u91 MAINTAINER Moreno, Carlos Santiago <email@example.com> COPY myjar.jar /myjar.jar ENTRYPOINT ["java","-jar","/myjar.jar"]
Now let's build it, and run it:
# Build it $ docker build -t my-java-app-image . # And run it $ docker run my-java-app-image
Now you have a goog docker image to run your java apps, let your crativity flys. But if you think you could use some ideas, visit 123Software! Blog.