Java Dockerfile for trusted automated Docker builds.
Latest commit 926218e Oct 2, 2014 @pilwon pilwon Merge pull request #14 from alkersan/master
Cleaning oracle-jdk cache as proposed in dockerfile/java#13

Java Dockerfile

This repository contains Dockerfile of Java for Docker's automated build published to the public Docker Hub Registry.

Base Docker Image

Docker Tags

dockerfile/java provides multiple tagged images:

  • latest (default): OpenJDK Java 7 JRE (alias to openjdk-7-jre)
  • openjdk-6-jdk: OpenJDK Java 6 JDK
  • openjdk-6-jre: OpenJDK Java 6 JRE
  • openjdk-7-jdk: OpenJDK Java 7 JDK
  • openjdk-7-jre: OpenJDK Java 7 JRE
  • oracle-java6: Oracle Java 6 JDK
  • oracle-java7: Oracle Java 7 JDK
  • oracle-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


  1. Install Docker.

  2. 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"


docker run -it --rm dockerfile/java

Run java

docker run -it --rm dockerfile/java java

Run javac

docker run -it --rm dockerfile/java javac