This repository contains Dockerfile of Java for Docker's automated build published to the public Docker Hub Registry.
dockerfile/java
provides multiple tagged images:
latest
(default): OpenJDK Java 7 JRE (alias toopenjdk-7-jre
)openjdk-6-jdk
: OpenJDK Java 6 JDKopenjdk-6-jre
: OpenJDK Java 6 JREopenjdk-7-jdk
: OpenJDK Java 7 JDKopenjdk-7-jre
: OpenJDK Java 7 JREoracle-java6
: Oracle Java 6 JDKoracle-java7
: Oracle Java 7 JDKoracle-java8
: Oracle Java 8 JDK
For example, you can run a Oracle Java 8
container with the following command:
docker run -it --rm dockerfile/java:oracle-java8 java -version
-
Install Docker.
-
Download automated build from public Docker Hub Registry:
docker pull dockerfile/java
(alternatively, you can build an image from Dockerfile:
docker build -t="dockerfile/java" github.com/dockerfile/java
)
docker run -it --rm dockerfile/java
docker run -it --rm dockerfile/java java
docker run -it --rm dockerfile/java javac