Public | Automated Build

Last pushed: 2 days ago
Short Description
Oracle Java 8 (and 7) with GLIBC 2.23 over AlpineLinux
Full Description

Minified Docker image with Java

Basic Docker image to run Java applications.
This image is based on AlpineLinux to keep the size down, yet smaller images do exist.
Includes BASH, since many Java applications like to have convoluted BASH start-up scripts.

Versions/tags

All tags upgraded to alpine:3.4

MAJOR TAGGING UPDATE

To allow selection of specific Java version, a major retagging is taking place.
Old tags will remain for compatibility sake, but are no longer documented.
:8,:7 and :latest are all valid, but are not "locked" to any specific Java version / patch set - i.e. depending on when you pull the :8 tagged image, for example, you might end up with 8u102b14, 8u112b15, 8u121b13, etc..
Well, :7 no as much, since it's EOL and no more patches are released.

However specific :8uXXXbYY tags (such as :8u102b14, :8u112b15) will guarantee particular MAJOR-MINOR-BUILD Java versions.

JCE Policy

Special _unlimited images are available with Unlimited JCE Policy

Latest JRE8/JDK8 Version: 8u144b01
Latest JRE7/JDK7 Version: 7u80b15
JDK8/JDK7 Versions with alternative JVM - DCEVM: light-8u112 / full-7u80

Tags

Latest Oracle Java 8 Server-JRE:

  • latest
  • 8
  • 8_server-jre
  • 8_server-jre_unlimited

Latest Oracle Java 8 JDK (plus DCEVM variant)

  • 8_jdk
  • 8_jdk_unlimited
  • 8_jdk-dcevm
  • 8_jdk-dcevm_unlimited

Latest Oracle Java 7 Server-JRE:

  • 7
  • 7_server-jre

Latest Oracle Java 7 JDK (plus DCEVM variant):

  • 7_jdk
  • 7_jdk-dcevm

Usage

Example:

docker run -it --rm anapsix/alpine-java java -version

Disclaimer

By using Dockerfiles contained in this repo and/or container images derived from them, you are agreeing to any and all applicable license agreements & export rules related to unlimited strength crypto, etc..

Docker Pull Command
Owner
anapsix
Source Repository

Comments (21)
thatsk
4 months ago

whats the differenence between when i use openjdk as compared to oraclejdk
because my container size is 129 MB

violenti
4 months ago

Hi, i see your dockerfile of alpine-java:7_jdk and have old dependency as glibc 2.23. Can you upgrade Dockerfile with the new version de glibc? also bind is too old.

https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html

Thanks!

manojmonu23
5 months ago

ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.4/main: temporary error (try again later)
Unable to build any extended image even --repository not working. I checked and found no internet availability inside image

anapsix
6 months ago

@abyu: the root password is unset

$ docker run -it --rm alpine:3.4 sh -c 'grep root /etc/shadow'
root:::0:::::
abyu
6 months ago

anyone know what the root password is ?

anapsix
8 months ago

@philiprhoades unless you are setting RAM limits on your docker instances, I've no idea.. haven't seen it happen myself, perhaps someone who has could chime in..

philiprhoades
9 months ago

I had gotten into the habit of building a Docker image with the same OS as the host (my workstation is Fedora 25 x86_64) so in this case I created an Alpine VM, converted my Fedora Dockerfile and built the Alpine image using opendjdk8 on the Alpine VM - and immediately discovered the dreaded "__rawmemchr: symbol not found" error message because of the musl / glibc thing. So I tried building from this image instead but running the Java app kept giving "Insufficient memory for JRE to continue" even though there was plenty of memory. I stuffed around with it for a while but couldn't sort the problem out so I copied the Alpine Dockerfile to the Fedora WS and built the image directly there and it all works fine - so I don't have a problem now but I was wondering if you could comment on why my first approach didn't work ie:

Fedora WS -> Alpine VM -> anapsix/alpine-java Docker image

phiner
a year ago

Thanks a lot!

anapsix
a year ago

MAJOR TAGGING UPDATE
please see README

anapsix
a year ago

@cten, the size discrepancy is due to the way Docker Hub calculates tag size. I think, it has to do with layers it selects to include in calculation (it might be excluding the "base" layer and shows compressed size (?))