What is Java?
Java is a concurrent, class-based, object-oriented language specifically designed to have as few implementation dependencies as possible.
It is intended to allow application developers to "write once, run anywhere", meaning that code that runs on one platform does not need to be recompiled to run on another.
Java is a registered trademark of Oracle and/or its affiliates.
This image is based on Alpine Linux and all the tools related to Java FX have been removed in order to reduce the image size.
The image size is approximately 179 MB.
The following packages have been integrated:
- glibc (thanks to the work of gliderlabs )
The most straightforward way to use this image is to use a Java container as both the build and runtime environment.
Dockerfile, writing something along the lines of the following will compile and run your project:
FROM 1science/java:oracle-jre-7 COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN javac Main.java CMD ["java", "Main"]
You can then run and build the Docker image:
docker build -t my-java-app . docker run -it --rm --name my-running-app my-java-app
All the code contained in this repository, unless explicitly stated, is
licensed under ISC license.
A copy of the license can be found inside the LICENSE file.