Public | Automated Build

Last pushed: 3 days ago
Short Description
Oracle JDKs (Alpine, CentOS, Debian) rebuilt automatically with each Java release.
Full Description

Oracle JDK Docker Base Images

— Images are built automatically from the latest Oracle Downloads

Docker project maintained by BinaryBabel — Not an official Oracle product release.

Available for Java 7/8, review Docker Hub Tags for all current releases.

Docker Hub Tag (JDK8) Base Image JAVA_HOME Working Dir ~Size
8-alpine -Dockerfile alpine:latest /opt/jdk/bin/java/ /srv/ 70mb
8-centos -Dockerfile centos:7 /usr/bin/java/ /srv/ 260mb
8-debian -Dockerfile debian:stable-slim /opt/jdk/bin/java/ /srv/ 100mb

These images are rebuilt when new versions of Java are released, through the use of webhooks provided by the Latestver dependency tracking tool, a BinaryBabel OSS Project.

JDK Current Version JDK Current Version
8 7

NOTE: JDK7 updates are no longer being provided publicly by Oracle.

Usage of Oracle Java is subject to acceptance of Oracle's Binary Code License Agreement (BCLA).

  • The environment variable ACCEPT_ORACLE_BCLA must be set. Examples are given below.
  • "Creating a Docker image" example explains accepting BCLA as part of a dependent image.
    • BCLA §C describes distributing Oracle Java, "for the sole purpose of running your Programs"
  • By using the Java binaries in any manner you are accepting the Oracle BCLA.

Container Usage Examples

The entry-point for each container is the java command, by default.
So additional docker command line options become Java options.

Print Containerized Java Version

docker run --rm -e ACCEPT_ORACLE_BCLA=true binarybabel/jdk:8-alpine -version

Using Compose to run a JAR


version: '2'
    image: 'binarybabel/jdk:8-alpine'
      - /path/to/some/local/file.jar:/srv/app.jar:ro
    command: [-jar, app.jar]

Creating a Docker image / Redistribution


FROM binarybabel/jdk:8-alpine

# ------------------------------------------------------
# Accept the Oracle License for all users of this image,
# per Section C of the BCLA, permitting Oracle Java:
#   "(i) ... bundled as part of, and for the
#    sole purpose of running, your Programs"
# ------------------------------------------------------

RUN curl | tar xz

CMD ["-jar", "some-java-app/app.jar"]

Building / Running

By accepting the Oracle BCLA in the Dockerfile, users are not required to set the ENV option.

$ docker build -t myorg/myapp .
$ docker run --rm myorg/myapp

Maintainer & Licenses

    The Dockerfile(s), build mechanics, and documentation          1010    0010101000001
     provided in the source repository are maintained at:         010101110100111101010010
                                                                 01     0011000100
                                                               0100111001    000001010001110
                                                              101       0010010000010100100101
                                                          00111          0010011110100011001010
                                                          0110            10000010100111001000100
  • Unless otherwise noted, all source-controlled files are released under the MIT License.
  • When built, this repository generates artifacts that may bundle resources from other licenses:
    • Repository file THIRDPARTYLICENSEREADME.txt may contain additional information.
    • To the best of the maintainer's knowledge, any build-time dependencies were released under a license permitting their inclusion in such an open-source build.
Docker Pull Command
Source Repository