Skip to content

marcel-dias/alpine-server-jre-8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

It is an AlpineLinux 3.4 with Oracle Server JRE 8 image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages