/alpine-server-jre-8

It is an AlpineLinux 3.4 with Oracle Server JRE 8 image

Primary LanguageJavaMIT LicenseMIT

alpine-server-jre-8

It is an AlpineLinux 3.4 with Oracle Server JRE 8 image

How to use it

❯ 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)

Extending it

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!!