A Ubuntu 18.04 environment with OpenJDK 11 and Maven
308
This is a Dockerfile used to build a Docker image derived from Ubuntu:18.04 with Open JDK 11 and Maven installed.
You can download it and build the image by yourself or just pull the image from DockerHUB and run it.
Download or clone this repository, then open the command prompt or the terminal (if you're using linux) and run:
docker build . -t java11-maven-env
From prompt or terminal, in your application root directory (pom.xml should be here) follow the steps below:
Windows:
docker run -d -i --name my-java11-container --mount type=bind,source="%cd%",target=/source crocarneiro1998/java11-maven-env
# If you have build the image by yourself use this command below instead
docker run -d -i --name my-java11-container --mount type=bind,source="%cd%",target=/source java11-maven-env
Linux:
docker run -d -i --name my-java11-container --mount type=bind,source="(pwd)",target=/source crocarneiro1998/java11-maven-env
# If you have build the image by yourself use this command below instead
docker run -d -i --name my-java11-container --mount type=bind,source="(pwd)",target=/source java11-maven-env
docker exec -i -t my-java11-container /bin/bash
mvn package
java jar target/my_application.jar
Content type
Image
Digest
Size
664 MB
Last updated
almost 7 years ago
docker pull crocarneiro1998/java11-maven-env