Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Docker Images for Java Devs #467

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,32 @@ $ docker run -it --rm <image_name>:<image_tag> java -version
java version "1.8....
```

Based on jabba there are prebuild Docker images for JDK only and JDK/Maven combinations.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @svenruppert. This is very useful! There is a typo. prebuild should be prebuilt.

The Images are generated by this open source project [https://github.com/svenruppert/docker-image-generator](https://github.com/svenruppert/docker-image-generator) and pushed to docker hub at [https://cloud.docker.com/u/svenruppert/](https://cloud.docker.com/u/svenruppert/)

To use this you could do the following:
```bash
docker run \
--rm \
--name run \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
svenruppert/adopt:1.12.0-1 \
java -jar target/myapp.jar
```

or with maven to build and run your app:

```bash
docker run \
--rm \
--name compile \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
svenruppert/maven-3.6.1-adopt:1.12.0-1 \
mvn clean install -Dmaven.test.skip=true
```

#### Windows 10

> (in powershell)
Expand Down