This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-base-runtime
88 lines (79 loc) · 3.48 KB
/
Dockerfile-base-runtime
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# (C) Copyright IBM Corporation 2016, 2019
#
# ------------------------------------------------------------------------------
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
# ------------------------------------------------------------------------------
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Modfied Dockerfile from a snapshot of:
# https://raw.githubusercontent.com/ibmruntimes/ci.docker/master/ibmjava/8/jre/ubi-min/Dockerfile
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.2
RUN microdnf install openssl wget ca-certificates gzip tar \
&& microdnf clean all
LABEL org.opencontainers.image.authors="Jayashree Gopi <jayasg12@in.ibm.com>" \
name="IBM JAVA" \
vendor="IBM" \
version=1.8.0_sr6fp10 \
release=8 \
run="docker run --rm -ti <image_name:tag> /bin/bash" \
summary="Image for IBM JAVA with UBI as the base image" \
description="This image contains the IBM JAVA with Red Hat UBI as the base OS. For more information on this image please see https://github.com/ibmruntimes/ci.docker/blob/master/README.md"
ENV JAVA_VERSION 1.8.0_sr6fp10
RUN set -eux; \
microdnf -y install shadow-utils; \
useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default; \
ARCH="$(uname -m)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='77b893a2b4e3f31c9de91b8db96af1ecd93e8571b6779e9464f5d039310f83ca'; \
YML_FILE='jre/linux/x86_64/index.yml'; \
;; \
ppc64el|ppc64le) \
ESUM='c0869107e776056d6fda87e570cf427556c5cab0fe99ece45f750bbedb4d33eb'; \
YML_FILE='jre/linux/ppc64le/index.yml'; \
;; \
s390x) \
ESUM='9ffdc8772f91c9fb6c72432f65d48b8fc6ccb34e41e6e225a34e2b3aa93c3047'; \
YML_FILE='jre/linux/s390x/index.yml'; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
BASE_URL="https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta/"; \
wget -q -U UA_IBM_JAVA_Docker -O /tmp/index.yml ${BASE_URL}/${YML_FILE}; \
JAVA_URL=$(sed -n '/^'${JAVA_VERSION}:'/{n;s/\s*uri:\s//p}'< /tmp/index.yml); \
wget -q -U UA_IBM_JAVA_Docker -O /tmp/ibm-java.bin ${JAVA_URL}; \
echo "${ESUM} /tmp/ibm-java.bin" | sha256sum -c -; \
echo "INSTALLER_UI=silent" > /tmp/response.properties; \
echo "USER_INSTALL_DIR=/opt/ibm/java" >> /tmp/response.properties; \
echo "LICENSE_ACCEPTED=TRUE" >> /tmp/response.properties; \
mkdir -p /opt/ibm; \
chmod +x /tmp/ibm-java.bin; \
/tmp/ibm-java.bin -i silent -f /tmp/response.properties; \
rm -f /tmp/response.properties; \
rm -f /tmp/index.yml; \
mkdir -p /licenses; \
cp /opt/ibm/java/license_en.txt /licenses; \
chown -R 1001:0 /opt/ibm/java; \
microdnf -y remove shadow-utils; \
microdnf clean all; \
rm -f /tmp/ibm-java.bin;
ENV JAVA_HOME=/opt/ibm/java/jre \
PATH=/opt/ibm/java/jre/bin:$PATH \
IBM_JAVA_OPTIONS="-XX:+UseContainerSupport"
USER 1001