Skip to content

Commit d6d4353

Browse files
committed
Update Java 11 and add support for additional LTS versions 17 and 21
1 parent f6fab45 commit d6d4353

3 files changed

Lines changed: 27 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ jobs:
1212
strategy:
1313
matrix:
1414
temurin_tag:
15-
- 11.0.21_9-jre
16-
- 11.0.21_9-jdk
15+
- 11.0.27_6-jre
16+
- 11.0.27_6-jdk
17+
- 17.0.15_6-jre
18+
- 17.0.15_6-jre
19+
- 21.0.7_6-jre
20+
- 21.0.7_6-jdk
21+
1722
runs-on: ubuntu-latest
1823
steps:
1924
- name: Checkout
@@ -35,4 +40,4 @@ jobs:
3540
needs: build
3641
runs-on: ubuntu-latest
3742
steps:
38-
- run: echo "The build completed successfully"
43+
- run: echo "The build completed successfully"

Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
ARG TEMURIN_TAG
22

33
FROM eclipse-temurin:$TEMURIN_TAG
4+
ARG TEMURIN_TAG
45

5-
MAINTAINER Dwolla Engineering <dev+docker@dwolla.com>
6+
LABEL maintainer="Dwolla Engineering <dev+docker@dwolla.com>"
67
LABEL org.label-schema.vcs-url="https://github.com/Dwolla/docker-java"
78

8-
RUN if [ -f "$JAVA_HOME/jre/lib/security/java.security" ] ; then \
9+
RUN set -e; \
10+
case "${TEMURIN_TAG}" in \
11+
"11"*) \
12+
NC_PACKAGE_NAME="netcat";; \
13+
"17"*|"21"*) \
14+
NC_PACKAGE_NAME="netcat-traditional";; \
15+
*) \
16+
echo "Error: Unrecognized or unset TEMURIN_TAG ('${TEMURIN_TAG}'). Cannot determine netcat package." >&2; \
17+
exit 77;; \
18+
esac; \
19+
if [ -f "$JAVA_HOME/jre/lib/security/java.security" ] ; then \
920
SECURITY_FILE_PATH=$JAVA_HOME/jre/lib/security/java.security ; \
1021
elif [ -f "$JAVA_HOME/lib/security/java.security" ] ; then \
1122
SECURITY_FILE_PATH=$JAVA_HOME/lib/security/java.security ; \
@@ -16,8 +27,10 @@ RUN if [ -f "$JAVA_HOME/jre/lib/security/java.security" ] ; then \
1627
exit 98 ; \
1728
fi && \
1829
apt-get update && \
19-
apt-get install -y bash && \
20-
apt-get install -y netcat && \
30+
apt-get install -y \
31+
bash \
32+
"${NC_PACKAGE_NAME}" \
33+
&& \
2134
sed -i s_#networkaddress.cache.ttl=-1_networkaddress.cache.ttl=60_ $SECURITY_FILE_PATH && \
2235
sed -i s_securerandom.source=file:/dev/random_securerandom.source=file:/dev/./urandom_ $SECURITY_FILE_PATH && \
2336
apt-get clean && \

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TEMURIN_TAGS := 8u322-b06-jdk 11.0.14.1_1-jdk 8u322-b06-jre 11.0.14.1_1-jre
1+
TEMURIN_TAGS := 11.0.27_6-jdk 11.0.27_6-jre 17.0.15_6-jre 17.0.15_6-jre 21.0.7_6-jdk 21.0.7_6-jre
22
JOBS := $(addprefix temurin-,${TEMURIN_TAGS})
33
CHECKS := $(addprefix check-,${TEMURIN_TAGS})
44
CLEAN := $(addprefix clean-,${TEMURIN_TAGS})
@@ -18,4 +18,4 @@ ${CHECKS}: check-%:
1818
grep --silent "^ - $*$$" .github/workflows/ci.yml
1919

2020
${CLEAN}: clean-%:
21-
docker rmi dwolla/docker-java:$*-SNAPSHOT --force
21+
docker rmi dwolla/docker-java:$*-SNAPSHOT --force

0 commit comments

Comments
 (0)