项目作者: binarybabel

项目描述 :
Docker Oracle JDKs (Alpine, CentOS, Debian)
高级语言: Shell
项目地址: git://github.com/binarybabel/docker-jdk.git
创建时间: 2017-01-15T20:58:50Z
项目社区:https://github.com/binarybabel/docker-jdk

开源协议:

下载


Oracle JDK Docker Base Images

Build Status GitHub release — 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 Latestver 7 Latestver

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

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

Using Compose to run a JAR

docker-compose.yml

  1. version: '2'
  2. services:
  3. app:
  4. image: 'binarybabel/jdk:8-alpine'
  5. environment:
  6. - ACCEPT_ORACLE_BCLA=true
  7. volumes:
  8. - /path/to/some/local/file.jar:/srv/app.jar:ro
  9. command: [-jar, app.jar]

Creating a Docker image / Redistribution

Dockerfile

  1. FROM binarybabel/jdk:8-alpine
  2. # ------------------------------------------------------
  3. # Accept the Oracle License for all users of this image,
  4. # per Section C of the BCLA, permitting Oracle Java:
  5. # "(i) ... bundled as part of, and for the
  6. # sole purpose of running, your Programs"
  7. # ------------------------------------------------------
  8. ENV ACCEPT_ORACLE_BCLA=true
  9. RUN curl http://example.com/some-java-app.tgz | tar xz
  10. 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.

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

Maintainer & Licenses

  1. 0101010
  2. 0010011
  3. 110101
  4. 0011
  5. 0100010
  6. The Dockerfile(s), build mechanics, and documentation 1010 0010101000001
  7. provided in the source repository are maintained at: 010101110100111101010010
  8. 01 0011000100
  9. https://github.com/binarybabel/docker-jdk
  10. 0100
  11. 01001001 binarybabel.org
  12. 0100111001 000001010001110
  13. 101 0010010000010100100101
  14. 00111 0010011110100011001010
  15. 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.