-
Notifications
You must be signed in to change notification settings - Fork 35
/
Dockerfile
88 lines (82 loc) · 3.74 KB
/
Dockerfile
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, 2018
#
# ------------------------------------------------------------------------------
# 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.
#
FROM alpine:3.7
MAINTAINER Dinakar Guniguntala <dinakar.g@in.ibm.com> (@dinogun)
RUN apk --update add --no-cache binutils ca-certificates openssl wget xz \
&& GLIBC_VER="2.25-r0" \
&& ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
&& wget -q -O /tmp/${GLIBC_VER}.apk ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \
&& apk add --allow-untrusted /tmp/${GLIBC_VER}.apk \
&& wget -q -O /tmp/gcc-libs.tar.xz https://www.archlinux.org/packages/core/x86_64/gcc-libs/download \
&& mkdir /tmp/gcc \
&& tar -xf /tmp/gcc-libs.tar.xz -C /tmp/gcc \
&& mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \
&& strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \
&& apk del binutils wget \
&& rm -rf /tmp/${GLIBC_VER}.apk /tmp/gcc /tmp/gcc-libs.tar.xz /var/cache/apk/*
ENV JAVA_VERSION 1.8.0_sr5fp22
RUN set -eux; \
apk --no-cache add --virtual .build-deps wget; \
ARCH="$(apk --print-arch)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='e9e179ad118cebf5ca5cd98b73c72dc04d8f725c4dc7f9fd19e90b7981d32289'; \
YML_FILE='sfj/linux/x86_64/index.yml'; \
;; \
i386) \
ESUM='1025b2ac347fc0961297eed075ffac36d94bb44458b0326bcf601a3f75248da4'; \
YML_FILE='sfj/linux/i386/index.yml'; \
;; \
ppc64el|ppc64le) \
ESUM='baf60399c147326270e2c68c5a533fed2148f480284f537fbf7ca9069dca0053'; \
YML_FILE='sfj/linux/ppc64le/index.yml'; \
;; \
s390) \
ESUM='555878d2a7a49b73a5d244770b535292d9affc38ab4e4adcc55961ce271bef33'; \
YML_FILE='sfj/linux/s390/index.yml'; \
;; \
s390x) \
ESUM='8582f1bcce1c12edcfbbbf810c002eca12de0446803c967f4a88299f6bd49403'; \
YML_FILE='sfj/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; \
rm -f /tmp/ibm-java.bin; \
apk del .build-deps;
ENV JAVA_HOME=/opt/ibm/java/jre \
PATH=/opt/ibm/java/jre/bin:$PATH \
IBM_JAVA_OPTIONS="-XX:+UseContainerSupport"