-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ibmjava (IBM® SDK, Java™ Technology Edition) docker image. #1749
Conversation
Just to make sure you're certain about the name of the image, you can do Overall this looks great (sorry for the delay). My current issue is just in building the alpine images; I'm not sure why the glibc overlay fails to install. Sending build context to Docker daemon 10.24 kB
Step 1 : FROM alpine:latest
---> 45a09e37e616
Step 2 : MAINTAINER Dinakar Guniguntala <dinakar.g@in.ibm.com> (@dinogun)
---> Using cache
---> 93bda4a8a309
Step 3 : RUN apk --update add curl wget ca-certificates tar && ln -s /lib /lib64 && curl -Ls https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk > /tmp/glibc-2.21-r2.apk && apk add --allow-untrusted /tmp/glibc-2.21-r2.apk && apk --update add xz && curl -Ls https://www.archlinux.org/packages/core/x86_64/gcc-libs/download > /tmp/gcc-libs.tar.gz && tar -xvf /tmp/gcc-libs.tar.gz -C / usr/lib/libgcc_s.so.1 usr/lib/libgcc_s.so && rm -f /tmp/gcc-libs.tar.gz && rm -f /tmp/glibc-2.21-r2.apk
---> Running in 2535b48d6d08
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/6) Installing ca-certificates (20160104-r4)
(2/6) Installing libssh2 (1.7.0-r0)
(3/6) Installing libcurl (7.49.1-r0)
(4/6) Installing curl (7.49.1-r0)
(5/6) Installing tar (1.29-r0)
(6/6) Installing wget (1.18-r0)
Executing busybox-1.24.2-r9.trigger
Executing ca-certificates-20160104-r4.trigger
OK: 7 MiB in 17 packages
ERROR: /tmp/glibc-2.21-r2.apk: IO ERROR
Removing intermediate container 2535b48d6d08
The command '/bin/sh -c apk --update add curl wget ca-certificates tar && ln -s /lib /lib64 && curl -Ls https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk > /tmp/glibc-2.21-r2.apk && apk add --allow-untrusted /tmp/glibc-2.21-r2.apk && apk --update add xz && curl -Ls https://www.archlinux.org/packages/core/x86_64/gcc-libs/download > /tmp/gcc-libs.tar.gz && tar -xvf /tmp/gcc-libs.tar.gz -C / usr/lib/libgcc_s.so.1 usr/lib/libgcc_s.so && rm -f /tmp/gcc-libs.tar.gz && rm -f /tmp/glibc-2.21-r2.apk' returned a non-zero code: 255 |
Hi @yosifkit , Thank you for the response ! Actually ibmjava has IBM legal approval and we also have been hosting it here as ibmjava so I'd prefer if we can continue with ibmjava. Regarding the alpine issue, since submitting the pull request I've updated the alpine to 3.4 as well as the glibc to 2.23-r2. Will update the pull request to the newer commit, Thanks again ! |
Hi @yosifkit , Have updated the PR to the latest Java (8.0-3.10) as well as updated the alpine to 3.4 and the alpine glibc to 2.23-r3. Have also updated the corresponding doc PR. Let me know if this works for you, Thanks |
LGTM, cc @tianon Build test of #1749; a978354 ( $ bashbrew build ibmjava:8-jre
warning: insecure protocol git:// detected: git://github.com/ibmruntimes/ci.docker
Building bashbrew/cache:d61b1bfc052a79cc0cf44b67a65d75249a067b4639f7501fad84861212c42e51 (ibmjava:8-jre)
Tagging ibmjava:8-jre
Tagging ibmjava:jre
Tagging ibmjava:8
Tagging ibmjava:latest
$ test/run.sh ibmjava:8-jre
testing ibmjava:8-jre
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build ibmjava:8-jre-alpine
Building bashbrew/cache:c9ed7ea6798a663c6d22a9c6bcecdab5c39891e395cb7204ad54947a33c29186 (ibmjava:8-jre-alpine)
Tagging ibmjava:8-jre-alpine
Tagging ibmjava:jre-alpine
$ test/run.sh ibmjava:8-jre-alpine
testing ibmjava:8-jre-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build ibmjava:8-sfj
Building bashbrew/cache:50da44acb898675937e1c293fc63a36abcd7dcb800151a6468129e3cb3e0b6cf (ibmjava:8-sfj)
Tagging ibmjava:8-sfj
Tagging ibmjava:sfj
$ test/run.sh ibmjava:8-sfj
testing ibmjava:8-sfj
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build ibmjava:8-sfj-alpine
Building bashbrew/cache:0947797e58dcce666716d0172d96abc072643f59b9949e7e77faf51674fe94d2 (ibmjava:8-sfj-alpine)
Tagging ibmjava:8-sfj-alpine
Tagging ibmjava:sfj-alpine
$ test/run.sh ibmjava:8-sfj-alpine
testing ibmjava:8-sfj-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build ibmjava:8-sdk
Building bashbrew/cache:ce89bcb9c7a58c03185524523c44a1a96871c1a04f28eb78782365793cc9c192 (ibmjava:8-sdk)
Tagging ibmjava:8-sdk
Tagging ibmjava:sdk
$ test/run.sh ibmjava:8-sdk
testing ibmjava:8-sdk
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
|
Here's a diff from diff --git a/websphere-liberty_kernel/Dockerfile b/ibmjava_latest/Dockerfile
similarity index 40%
copy from websphere-liberty_kernel/Dockerfile
copy to ibmjava_latest/Dockerfile
index 8a328c6..095681e 100644
--- a/websphere-liberty_kernel/Dockerfile
+++ b/ibmjava_latest/Dockerfile
@@ -1,4 +1,10 @@
-# (C) Copyright IBM Corporation 2015.
+# (C) Copyright IBM Corporation 2016.
+#
+# ------------------------------------------------------------------------------
+# 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.
@@ -11,29 +17,25 @@
# 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 ubuntu:16.04
-MAINTAINER Kavitha Suresh Kumar <kavisuresh@in.ibm.com> (@kavi2002suresh)
+MAINTAINER Dinakar Guniguntala <dinakar.g@in.ibm.com> (@dinogun)
RUN apt-get update \
- && apt-get install -y wget unzip \
+ && apt-get install -y --no-install-recommends wget ca-certificates \
&& rm -rf /var/lib/apt/lists/*
-# Install JRE
-ENV JAVA_VER=8 \
- JAVA_REL=0 \
- JAVA_MF=3.0
-RUN TARGET_ARCH=$(uname -m) \
- && JAVA_VRMF=$JAVA_VER.$JAVA_REL-$JAVA_MF \
- && YML_FILENAME=ibm-java-jre-$JAVA_VRMF-linux-$TARGET_ARCH-javase.yml \
- && BASE_URL="https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta" \
- && wget -q -U UA-IBM_JAVA_Docker -O /tmp/ibm-java.yml $BASE_URL/$JAVA_VER$JAVA_REL/$YML_FILENAME \
- && JAVA_URL=$(cat /tmp/ibm-java.yml | sed -n 's/\s*uri:\s//p' | tr -d '\r') \
- && wget -q -U UA-IBM-JAVA-Docker -O /tmp/ibm-java.bin $JAVA_URL \
- && ESUM=$(cat /tmp/ibm-java.yml | sed -n 's/\s*md5sum:\s//p' | tr -d '\r') \
- && echo "$ESUM /tmp/ibm-java.bin" | md5sum -c - \
- && rm -f /tmp/ibm-java.yml \
+ENV JAVA_VERSION 1.8.0_sr3fp10
+
+RUN ESUM="c18b4e7d822df96aa244a01e1bd8e10d03e5fc2b806d809cbca82dca711faf54" \
+ && BASE_URL="https://public.dhe.ibm.com/ibmdl/export/pub/systems/cloud/runtimes/java/meta/" \
+ && YML_FILE="jre/linux/x86_64/index.yml" \
+ && wget -q -U UA_IBM_JAVA_Docker -O /tmp/index.yml $BASE_URL/$YML_FILE \
+ && JAVA_URL=$(cat /tmp/index.yml | sed -n '/'$JAVA_VERSION'/{n;p}' | sed -n 's/\s*uri:\s//p' | tr -d '\r') \
+ && 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 \
@@ -41,28 +43,8 @@ RUN TARGET_ARCH=$(uname -m) \
&& 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
-ENV JAVA_HOME=/opt/ibm/java \
- PATH=/opt/ibm/java/jre/bin:$PATH
-# Install WebSphere Liberty
-ENV LIBERTY_VERSION 16.0.0_2
-RUN LIBERTY_URL=$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep $LIBERTY_VERSION -A 6 | sed -n 's/\s*kernel:\s//p' | tr -d '\r') \
- && wget -q $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \
- && unzip -q /tmp/wlp.zip -d /opt/ibm \
- && rm /tmp/wlp.zip
-ENV PATH=/opt/ibm/wlp/bin:$PATH
-
-# Set Path Shortcuts
-ENV LOG_DIR=/logs \
- WLP_OUTPUT_DIR=/opt/ibm/wlp/output
-RUN mkdir /logs \
- && ln -s $WLP_OUTPUT_DIR/defaultServer /output \
- && ln -s /opt/ibm/wlp/usr/servers/defaultServer /config
-
-# Configure WebSphere Liberty
-RUN /opt/ibm/wlp/bin/server create \
- && rm -rf $WLP_OUTPUT_DIR/.classCache
-EXPOSE 9080 9443
-
-CMD ["/opt/ibm/wlp/bin/server", "run", "defaultServer"]
+ENV JAVA_HOME=/opt/ibm/java/jre \
+ PATH=/opt/ibm/java/jre/bin:$PATH |
Also, image size information for posterity: $ docker images ibmjava | sed -r 's/ +/\t/g' | column -t -s $'\t' -o ' '
REPOSITORY TAG IMAGE ID CREATED SIZE
ibmjava 8-sdk a58ae4c2664f 25 hours ago 353.3 MB
ibmjava sdk a58ae4c2664f 25 hours ago 353.3 MB
ibmjava 8-sfj-alpine f04fc783dbae 25 hours ago 101.1 MB
ibmjava sfj-alpine f04fc783dbae 25 hours ago 101.1 MB
ibmjava 8-sfj a1fdf31c69e8 25 hours ago 222.4 MB
ibmjava sfj a1fdf31c69e8 25 hours ago 222.4 MB
ibmjava 8-jre-alpine 6ec388d215d7 25 hours ago 183.9 MB
ibmjava jre-alpine 6ec388d215d7 25 hours ago 183.9 MB
ibmjava 8 a44cd3a67f6c 26 hours ago 305.4 MB
ibmjava 8-jre a44cd3a67f6c 26 hours ago 305.4 MB
ibmjava jre a44cd3a67f6c 26 hours ago 305.4 MB
ibmjava latest a44cd3a67f6c 26 hours ago 305.4 MB |
Add support for ibmjava (IBM® SDK, Java™ Technology Edition) docker images. This pull request is specifically only for x86_64 arch.
It has 3 variants, the SDK, JRE and the SFJ (small footprint JRE). It currently uses ubuntu 16.04 and the JRE and the SFJ support a alpine variant as well.
Checklist for Review
foobar
needs Node.js, hasFROM node:...
instead of grabbingnode
via other means been considered?)ifFROM scratch
, tarballs only exist in a single commit within the associated history?