Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker container for Java 1.8 and Maven 3.1.1
Full Description

Java 1.8 & Maven Dockerfile

This repository contains a Dockerfile to create a docker container with Java 1.8, Maven 3.1.1 and git

This Dockerfile has been published as a trusted build to the public Docker Registry.

Dependencies

Installation

  1. Install Docker.

  2. Download trusted build from public Docker Registry: docker pull jamesdbloom/docker-java8-maven

    (alternatively, you can build an image from Dockerfile: docker build -t="jamesdbloom/docker-java8-maven" github.com/jamesdbloom/docker_java8_maven)

Usage (two options)

1. Run container and clone git repo into container

docker run -i -t -name docker-java8-maven -rm jamesdbloom/docker-java8-maven

git clone <your repo url>

2. Run container with git repo attached container (from host OS)

docker run -i -t -name docker-java8-maven -rm -v <your git repo directory>:/volume/git jamesdbloom/docker-java8-maven

James D Bloom

Docker Pull Command
Owner
jamesdbloom
Source Repository

Comments (4)
tetration
7 months ago

Thanks Gustavo - that worked.

`
root@3b0ca8cb73fd:/local/git# java -version
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-1~deb8u1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

root@3b0ca8cb73fd:/local/git# update-alternatives --list java
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
root@3b0ca8cb73fd:/local/git# update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
root@3b0ca8cb73fd:/local/git# java -version
openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b01)
OpenJDK 64-Bit Server VM (build 25.66-b01, mixed mode)
`

gustavoarellano
a year ago

Please run your Docker image and execute "java -version"
You will see you have 1.7 instead 1.8
However, the image does have both 1.7 & 1.8 (take a look of the directory /usr/lib/jvm)
So.... just use update-alternatives and everything will work ok.
Cheers !!!!

lerk
2 years ago

I get Unsupported major.minor version 52.0 when running a jar which was compiled witch J1.8.

debovema
2 years ago

Seems to me that this is Maven 3.0.5 (not 3.1.1)