All Projects → Docker-Hub-frolvlad → Docker Alpine Java

Docker-Hub-frolvlad / Docker Alpine Java

Licence: mit
Small Docker image with Java 8+ runtime (JRE ~119MB) and devkit (JDK ~167MB)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Docker Alpine Java

Lstags
Explore Docker registries and manipulate Docker images!
Stars: ✭ 277 (-16.06%)
Mutual labels:  docker-image
Cli
✨ A powerful CLI for the Create Go App project. Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!
Stars: ✭ 292 (-11.52%)
Mutual labels:  docker-image
Bitnami Docker Redis
Bitnami Redis Docker Image
Stars: ✭ 317 (-3.94%)
Mutual labels:  docker-image
Sitebroker
A cross-platform python based utility for information gathering and penetration testing automation!
Stars: ✭ 281 (-14.85%)
Mutual labels:  docker-image
Docker
⛴ Docker image of Nextcloud
Stars: ✭ 3,560 (+978.79%)
Mutual labels:  docker-image
Openjdk Docker
Scripts for creating Docker images of OpenJDK binaries.
Stars: ✭ 299 (-9.39%)
Mutual labels:  docker-image
Docker Oracle Xe
Docker build for Oracle Database Express Edition (XE)
Stars: ✭ 266 (-19.39%)
Mutual labels:  docker-image
Wekan
The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
Stars: ✭ 17,648 (+5247.88%)
Mutual labels:  docker-image
Docker Sshd
Minimal Alpine Linux Docker image with sshd exposed and rsync installed
Stars: ✭ 291 (-11.82%)
Mutual labels:  docker-image
Phabricator
A Docker image that runs Phabricator, an open source software engineering tool
Stars: ✭ 318 (-3.64%)
Mutual labels:  docker-image
Docker Python3 Opencv
🐋 🐍 👁 Docker image with python 3 and opencv 4.1
Stars: ✭ 283 (-14.24%)
Mutual labels:  docker-image
Yii2 Docker
Official Docker images suitable for Yii 2.0
Stars: ✭ 286 (-13.33%)
Mutual labels:  docker-image
Dockercheatsheet
🐋 Docker Cheat Sheet 🐋
Stars: ✭ 3,301 (+900.3%)
Mutual labels:  docker-image
Docker Mtgo
Docker image with ready-to-play MTGO (Magic Online) for Linux and macOS
Stars: ✭ 275 (-16.67%)
Mutual labels:  docker-image
Docker
A Dockerized version of Cachet.
Stars: ✭ 318 (-3.64%)
Mutual labels:  docker-image
Docker Openldap
A docker image to run OpenLDAP 🐳
Stars: ✭ 3,202 (+870.3%)
Mutual labels:  docker-image
Softethervpn
A Docker Automated Build Repository for SoftEther VPN
Stars: ✭ 297 (-10%)
Mutual labels:  docker-image
Portainer
Making Docker and Kubernetes management easy.
Stars: ✭ 20,434 (+6092.12%)
Mutual labels:  docker-image
Kube Ingress Aws Controller
Configures AWS Application Load Balancers according to Kubernetes Ingress resources
Stars: ✭ 326 (-1.21%)
Mutual labels:  docker-image
Image Syncer
Docker image synchronization tool for Docker Registry V2 based services
Stars: ✭ 313 (-5.15%)
Mutual labels:  docker-image

Docker Stars Docker Pulls

Java Docker image

This image is based on Alpine Linux image, which is only a 5MB image, and contains Java runtime (JRE) and Java development kit (JDK) conveniently packaged into separate Docker tags.

DEPRECATION DUE TO ORACLE JAVA LICENSING CHANGE

Thank you to everyone using images derived from this repo, to everyone who inspired and contributed. After April 2019, due to Oracle Java licensing changes, this repo is deprecated, and is now for reference only. No new builds will be published to frolvlad/alpine-java repo on Docker Hub from this Github repo.

As announced, Java licensing changed, and starting April 2019 commercial usage of Oracle Java required subscription. In other words, switch to OpenJDK, or use older versions of Oracle Java (for reference, pre-built images are available on Docker Hub)

Official OpenJDK images receive regular updates, and are available at https://hub.docker.com/_/openjdk, including 8-jre-alpine (85MB), 8-jdk-alpine (105MB), 8-jre-slim (204MB), 8-jdk-slim (243MB), 8u212-jre-slim (204MB), 8u212-jdk-slim (243MB), etc..

For more details about Oracle Java Licensing, checkout this article: https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244

TL;DR

Oracle JDK 8 is going through the “End of Public Updates” process, which means the April 2019 update will restrict commercial use. However, since Java SE 9, Oracle is also providing Oracle OpenJDK builds which are free for commercial use (but only updated for 6 months). There are also free OpenJDK builds which will be updated (including security patches) from other providers like AdoptOpenJDK, Amazon, Azul, BellSoft, IBM, jClarity, Red Hat, the Linux distros et al.

And many others talking about Oracle Java SE licensing changes (Google search)

Tags

JDK bundle contains lots of unnecessary for Docker image stuff, so it was cleaned up. There are 3 tags: *-full (only src tarballs get removed), *-cleaned (desktop parts get cleaned), *-slim (everything but compiler and jvm is removed). master branch refers to jdk8-slim tag, but latest tag points to jdk8-cleaned.

jdk8-slim (master branch) download image size is:

jdk8-cleaned (latest tag) download image size is:

jdk8-full download image size is:

Consider using jre* tags of this image if you only need JRE (you can run Java applications, but cannot build/compile them):

jre8-slim (master branch) download image size is:

jre8-cleaned (latest tag) download image size is:

jre8-full download image size is:

Usage Example

$ echo 'public class Main { public static void main(String[] args) { System.out.println("Hello World"); } }' > Main.java
$ docker run --rm -v "$(pwd)":/mnt --workdir /mnt frolvlad/alpine-java:jdk8-slim sh -c "javac Main.java && java Main"

Once you have run this command you will get printed 'Hello World' from Java!

Tips

Use Docker multi-stage builds to slim down your final Docker images:

FROM frolvlad/alpine-java:jdk8-slim AS builder

RUN echo 'public class Main { public static void main(String[] args) { System.out.println("Hello World"); } }' > Main.java
RUN javac Main.java

FROM frolvlad/alpine-java:jre8-slim
COPY --from=builder /Main.class /

CMD ["java", "Main"]
$ docker build -t my-app .
$ docker run --rm my-app
Hello World

Your application image is going to be only 119MB on disk.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].