— 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.
The entry-point for each container is the java
command, by default.
So additional docker command line options become Java options.
docker run --rm -e ACCEPT_ORACLE_BCLA=true binarybabel/jdk:8-alpine -version
docker-compose.yml
version: '2'
services:
app:
image: 'binarybabel/jdk:8-alpine'
environment:
- ACCEPT_ORACLE_BCLA=true
volumes:
- /path/to/some/local/file.jar:/srv/app.jar:ro
command: [-jar, app.jar]
Dockerfile
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"
# ------------------------------------------------------
ENV ACCEPT_ORACLE_BCLA=true
RUN curl http://example.com/some-java-app.tgz | 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
0101010
0010011
110101
0011
0100010
The Dockerfile(s), build mechanics, and documentation 1010 0010101000001
provided in the source repository are maintained at: 010101110100111101010010
01 0011000100
https://github.com/binarybabel/docker-jdk
0100
01001001 binarybabel.org
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.
- Repository file