Skip to content
This repository was archived by the owner on Jun 1, 2018. It is now read-only.

Commit 74a05a3

Browse files
committed
Switch to official Java 8 base image
1 parent a05de6f commit 74a05a3

File tree

2 files changed

+11
-37
lines changed

2 files changed

+11
-37
lines changed

openjdk8/Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# Alpine Linux with OpenJDK Java Runtime Environment 8 and Bash
2-
3-
FROM alpine:3.3
1+
FROM java:8-jre-alpine
42

53
MAINTAINER Nick Zahn <hi@cloudunder.io>
64

7-
RUN apk add --update bash openjdk8 && rm -rf /var/cache/apk/*
5+
RUN apk add --update bash && rm -rf /var/cache/apk/*

readme.md

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,23 @@
11
# Minimal Java Runtime Environment
22

3-
Good to go for Play Framework apps and other stuff, of course.
3+
Good to go for **Play Framework** apps and other stuff, of course.
44

5-
## Latest addition: OpenJDK JRE 8
6-
7-
Less than 150 MB. Image: `cloudunder/java-runtime:openjdk8`
8-
9-
## JRE 7
10-
11-
A very small Docker image with a Java Runtime Environment (OpenJDK 7) based on [Alpine Linux](https://registry.hub.docker.com/u/gliderlabs/alpine/). We also installed the Bash shell, because we want to use this as a base image for [Play Framework](https://www.playframework.com) web applications and the standard start script of a Play app is a Bash script.
12-
13-
Of course, this image is not limited to Play apps, but that’s what we use it for.
5+
> Since the [official Java repository on Docker Hub](https://hub.docker.com/_/java/) now also has minimal images based on Alpine Linux, there is not much point in maintaining this repository any longer.
146
157
* [Image on Docker Hub](https://registry.hub.docker.com/u/cloudunder/java-runtime/)
168
* [Source on GitHub](https://github.com/CloudUnder/dockerfile-java-runtime)
179

18-
## JRE 8
10+
## OpenJDK JRE 8 (including Bash)
1911

20-
Unfortunately a not quite so small Docker image with a Java Runtime Environment 8 (Oracle JRE) on CentOS 7.
12+
Less than 120 MB image: `cloudunder/java-runtime:openjdk8`
2113

22-
Of course, this image is not limited to Play apps, but that’s what we use it for.
14+
> The only difference to the official `java:8-jre-alpine` image is that this one has **bash** installed, which is handy to start a Play application using the bash script that comes with a build (e.g. `sbt stage`).
2315
24-
* [Image on Docker Hub](https://registry.hub.docker.com/u/cloudunder/java-runtime/)
25-
* [Source on GitHub](https://github.com/CloudUnder/dockerfile-java-runtime)
16+
## JRE 7
2617

27-
## Size comparison
18+
> No longer maintained.
2819
29-
```
30-
REPOSITORY TAG IMAGE ID VIRTUAL SIZE
31-
cloudunder/java-runtime openjdk8 5f6d87db84a4 146.5 MB
32-
cloudunder/java-runtime 7 dc871d857866 123.5 MB
33-
cloudunder/java-runtime 8 e0cde27ac86a 441.5 MB
34-
jeanblanchard/busybox-java 7 f36e3fd69366 146.5 MB
35-
java openjdk-7-jre 44faa7b2809f 332.3 MB
36-
dockerfile/java openjdk-7-jre d97696b2fb1b 684.4 MB
37-
```
20+
A very small Docker image with a Java Runtime Environment (OpenJDK 7) based on [Alpine Linux](https://registry.hub.docker.com/u/gliderlabs/alpine/). We also installed the Bash shell, because we want to use this as a base image for [Play Framework](https://www.playframework.com) web applications and the standard start script of a Play app is a Bash script.
3821

3922
## How to use this image
4023

@@ -51,10 +34,7 @@ docker run --rm cloudunder/java-runtime:7 java -version
5134
A sample `Dockerfile` for a Play Framework application:
5235

5336
```
54-
# If you want Java 7:
55-
# FROM cloudunder/java-runtime:7
56-
# Or if you want Java 8:
57-
FROM cloudunder/java-runtime:8
37+
FROM cloudunder/java-runtime:openjdk8
5838
5939
WORKDIR /app
6040
COPY target/universal/stage/ .
@@ -84,7 +64,3 @@ docker run -p 80:9000 -t yourappimagename
8464
```
8565

8666
Now you should be able to open the app in your browser.
87-
88-
## Experimental
89-
90-
All this is still experimental, so use with care. Any suggestions are also welcome!

0 commit comments

Comments
 (0)