-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (50 loc) · 2.06 KB
/
Dockerfile
File metadata and controls
59 lines (50 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
# check=error=true
#
# Provides the common Java Runtime for SDP products
#
FROM local-image/vector
ARG PRODUCT_VERSION
ARG RELEASE_VERSION="1"
LABEL name="Stackable image for OpenJDK" \
maintainer="info@stackable.tech" \
vendor="Stackable GmbH" \
version="${PRODUCT_VERSION}" \
release="${RELEASE_VERSION}" \
summary="The Stackable OpenJDK base image." \
description="This image is the base image for all Stackable Java product images."
# See: https://adoptium.net/en-gb/installation/linux/#_centosrhelfedora_instructions
RUN cat <<EOF > /etc/yum.repos.d/adoptium.repo
[Adoptium]
name=Adoptium
# The adoptium mirror times-out often, so we have created a pull-through cache
# baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/\$releasever/\$basearch
baseurl=https://build-repo.stackable.tech/repository/Adoptium/\$releasever/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
EOF
RUN microdnf update && \
microdnf install \
# Needed to run Java programs
"temurin-${PRODUCT_VERSION}-jre" \
# Needed, because otherwise e.g. Zookeeper fails with
# Caused by: java.io.FileNotFoundException: /usr/lib/jvm/java-11-openjdk-11.0.20.0.8-2.el8.x86_64/lib/tzdb.dat (No such file or directory)
tzdata-java \
# Most of the Java tools needs at least "klist" and "kinit" for Kerberos integration
krb5-workstation \
--nodocs && \
microdnf clean all
COPY java-base/licenses /licenses
ENV JAVA_HOME="/usr/lib/jvm/temurin-${PRODUCT_VERSION}-jre"
# This image doesn't include the development packages for Java.
# For images that need the devel package (ex. Spark) use this env variable to
# install the proper javac version.
#
# microdnf install java-${JAVA_VERSION}-openjdk-devel
#
ENV JAVA_VERSION=$PRODUCT_VERSION
# Mitigation for CVE-2021-44228 (Log4Shell)
# This variable is supported as of Log4j version 2.10 and
# disables the vulnerable feature
ENV LOG4J_FORMAT_MSG_NO_LOOKUPS=true