Skip to content

Commit e73c6bd

Browse files
committed
Add a tag with OpenJDK 11
1 parent 7e32853 commit e73c6bd

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ FROM prantlf/node-git:lts-alpine
22
LABEL maintainer="Ferdinand Prantl <[email protected]>"
33

44
# From https://github.com/docker-library/openjdk/tree/dd54ae37bc44d19ecb5be702d36d664fed2c68e4
5+
ARG JAVER=11
56
ENV LANG C.UTF-8
6-
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/jre
7-
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
8-
RUN apk --no-cache add openjdk8-jre
7+
ENV JAVA_HOME /usr/lib/jvm/default-jvm/jre
8+
ENV PATH $PATH:/usr/lib/jvm/default-jvm/jre/bin:/usr/lib/jvm/default-jvm/bin
9+
RUN apk --no-cache add openjdk${JAVER}-jre

Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ lint ::
77
-e XDG_CONFIG_HOME=/bin hadolint/hadolint \
88
< Dockerfile
99

10-
build ::
11-
docker build -t node-git-chromium-java .
10+
build :: build8 build11
1211

13-
shell ::
14-
docker run --rm -t -i node-git-chromium-java busybox sh
15-
16-
tag ::
12+
build8 ::
13+
docker build --build-arg JAVER=8 -t node-git-chromium-java .
1714
docker tag node-git-chromium-java prantlf/node-git-chromium-java:lts-alpine-java8
1815

16+
build11 ::
17+
docker build --build-arg JAVER=8 -t node-git-chromium-java .
18+
docker tag node-git-chromium-java prantlf/node-git-chromium-java:lts-alpine-openjdk
19+
20+
run ::
21+
docker run --rm -t -i node-git-chromium-java busybox sh
22+
1923
login ::
2024
docker login --username=prantlf
2125

2226
push ::
2327
docker push prantlf/node-git-chromium-java:lts-alpine-java8
28+
docker push prantlf/node-git-chromium-java:lts-alpine-openjdk

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44

55
[![nodesource/node](http://dockeri.co/image/prantlf/node-git-chromium-java)](https://hub.docker.com/repository/docker/prantlf/node-git-chromium-java/)
66

7-
[This image] is supposed to build and test [Node.js packages (NPM modules)], which include dependencies pulled by [Git] and their tests need [headless Chromium] driven by [Selenium]. ([Java 8] is included.) It is built automatically on the top of the tag `lts-alpine` from the [node repository], so that it always runs the current [LTS version] of [Node.js] in the latest [Alpine Linux]. [Git], [Chromium] and [Java 8] have to be updated from time to time by triggering a new build manually.
7+
[This image] is supposed to build and test [Node.js packages (NPM modules)], which include dependencies pulled by [Git] and their tests need [headless Chromium] driven by [Selenium]. ([Java 8)] or [OpenJDK] are included.) It is built automatically on the top of the tag `lts-alpine` from the [node repository], so that it always runs the current [LTS version] of [Node.js] in the latest [Alpine Linux]. [Git], [Chromium] and [Java 8]/[OpenJDK] have to be updated from time to time by triggering a new build manually.
88

99
## Tags
1010

1111
- [`lts-alpine-java8`]
12+
- [`lts-alpine-openjdk`]
1213

1314
## Install
1415

1516
```
1617
docker pull prantlf/node-git-chromium-java
1718
# or
1819
docker pull prantlf/node-git-chromium-java:lts-alpine-java8
20+
# or
21+
docker pull prantlf/node-git-chromium-java:lts-alpine-openjdk
1922
```
2023

2124
## Use
@@ -24,24 +27,20 @@ See [how to use the base node image] for more information.
2427

2528
## Build, Test and Publish
2629

27-
The local image is built as `node-git-chromium-java` and pushed to the docker hub with the tag `prantlf/node-git-chromium-java:lts-alpine-java8`.
30+
The local image is built as `node-git-chromium-java` and pushed to the docker hub with tags `prantlf/node-git-chromium-java:lts-alpine-java8` and `prantlf/node-git-chromium-java:lts-alpine-openjdk`.
2831

2932
Remove an old local image:
3033

3134
make clean
3235

33-
Build a new local image:
36+
Build and tag new local images:
3437

3538
make build
3639

37-
Enter an interactive shell inside the created image:
40+
Enter an interactive shell inside the latest created image:
3841

3942
make run
4043

41-
Tag the local image for pushing:
42-
43-
make tag
44-
4544
Login to the docker hub:
4645

4746
make login
@@ -58,13 +57,15 @@ Licensed under the MIT license.
5857

5958
[Docker]: https://www.docker.com/
6059
[This image]: https://hub.docker.com/repository/docker/prantlf/node-git-chromium-java
61-
[`lts-alpine`]: https://hub.docker.com/repository/docker/prantlf/node-git-chromium-java/tags
60+
[`lts-alpine-java8`]: https://hub.docker.com/repository/docker/prantlf/node-git-chromium-java/tags
61+
[`lts-alpine-openjdk`]: https://hub.docker.com/repository/docker/prantlf/node-git-chromium-java/tags
6262
[Node.js packages (NPM modules)]: https://docs.npmjs.com/about-packages-and-modules
6363
[Git]: https://git-scm.com/
6464
[headless Chromium]: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
6565
[Chromium]: https://www.chromium.org/
6666
[Selenium]: https://www.selenium.dev/
6767
[Java 8]: https://www.java.com/
68+
[OpenJDK]: https://openjdk.java.net/
6869
[node repository]: https://hub.docker.com/_/node
6970
[LTS version]: https://nodejs.org/en/about/releases/
7071
[Node.js]: https://nodejs.org/

0 commit comments

Comments
 (0)