Java Version | Tag | Dockerfile |
---|---|---|
Java JRE 8 | jre.8, latest | Dockerfile |
Java Server JRE 8 | server-jre.8 | Dockerfile |
Java JDK 8 | jdk.8 | Dockerfile |
Java Version | Tag | Dockerfile |
---|---|---|
Java JRE 8 | centos.jre.8 | Dockerfile |
Java Server JRE 8 | centos.server-jre.8 | Dockerfile |
Java JDK 8 | centos.jdk.8 | Dockerfile |
Java Version | Tag | Dockerfile |
---|---|---|
Java JRE 8 | ubuntu.jre.8 | Dockerfile |
Java Server JRE 8 | ubuntu.server-jre.8 | Dockerfile |
Java JDK 8 | ubuntu.jdk.8 | Dockerfile |
Java Version | Tag | Dockerfile |
---|---|---|
Java JRE 8 | openjre.8 | Dockerfile |
Java JDK 8 | openjdk.8 | Dockerfile |
$ docker run blacklabelops/java java -version
Will print the java version on console.
Just add the respective tag to the image name!
Example: Java JDK 8
$ docker run blacklabelops/java:jdk.8 java -version
Will print the java version on console.
Example Dockerfile:
FROM blacklabelops/java
MAINTAINER Your Name <your@email.com>
RUN Install-Your-Tooling
Will use Java JRE 8 as your base image.
Need the JDK?
Example Dockerfile:
FROM blacklabelops/java:jdk8
MAINTAINER Your Name <your@email.com>
RUN Install-Your-Tooling
Will use Java JDK 8 as your base image.
Take a Dockerfile and build with the default arguments:
$ docker build -t blacklabelops/java -f java-oracle-alpine/Dockerfile .
Build a specific Oracle Version with the following build arguments:
- JAVA_DISTRIBUTION: jdk or jre (default: jdk)
- JAVA_MAJOR_VERSION: 7 or 8
- JAVA_UPDATE_VERSION: The minor version from any Oracle Java download page.
- JAVA_BUILD_NUMBER: The build number from any Oracle Java download page.
Example:
$ docker build -t blacklabelops/java \
--build-arg JAVA_DISTRIBUTION=jdk \
--build-arg JAVA_MAJOR_VERSION=8 \
--build-arg JAVA_UPDATE_VERSION=74 \
--build-arg JAVA_BUILD_NUMBER=02 \
-f java-oracle-alpine/Dockerfile .
Will build image containing Java JDK 8 in version 8.74.02.
Leave a message and ask questions on Hipchat: blacklabelops/hipchat
The Dockerfiles for the different Java versions are maintained in the respective folders.
Example:
Folder: java-jdk-8-oracle
Version: Java Development Kit (JDK) Version 8, VM implementation by Oracle
Vagrant is fabulous tool for pulling and spinning up virtual machines like docker with containers. I can configure my development and test environment and simply pull it online. And so can you! Install Vagrant and Virtualbox and spin it up. Change into the project folder and build the project on the spot!
$ vagrant up
$ vagrant ssh
[vagrant@localhost ~]$ cd /vagrant/java-jdk-8-oracle/
[vagrant@localhost ~]$ docker build -t blacklabelops/jdk8 .