It is an AlpineLinux 3.4 with Oracle Server JRE 8 image
❯ docker run -ti --rm marceldiass/alpine-server-jre-8
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
Create a simple java HelloWorld class. You can see the example here
echo 'public class HelloWorld { public static void main(String... a) {System.out.println("Java Hello World into a Docker Container!!");}}' > HelloWorld.java
FROM marceldiass/alpine-server-jre-8
ADD HelloWorld.java /home/
WORKDIR /home
RUN javac HelloWorld.java
CMD java HelloWorld
Then you need to build it
❯ docker build -t your-image-name .
And you can run it
❯ docker run -ti --rm your-image-name
Java Hello World into a Docker Container!!