Skip to content
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

Update websphere-liberty beta to 2018.6.0_0 #4444

Closed

Conversation

wraschke
Copy link
Contributor

@wraschke wraschke commented Jun 9, 2018

No description provided.

@tianon
Copy link
Member

tianon commented Jun 11, 2018

Diff:
diff --git a/websphere-liberty_beta/Dockerfile b/websphere-liberty_beta/Dockerfile
index 43b4ce1..11175db 100644
--- a/websphere-liberty_beta/Dockerfile
+++ b/websphere-liberty_beta/Dockerfile
@@ -21,7 +21,7 @@ RUN apt-get update \
     && rm -rf /var/lib/apt/lists/*
 
 # Install WebSphere Liberty
-ENV LIBERTY_VERSION 2018.5.0_0
+ENV LIBERTY_VERSION 2018.6.0_0
 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 3 | sed -n 's/\s*webProfile7:\s//p' | tr -d '\r')  \
     && echo $LIBERTY_URL \
     && wget -q $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp-beta.zip \
@@ -34,7 +34,8 @@ 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
+    && ln -s /opt/ibm/wlp/usr/servers/defaultServer /config \
+    && ln -s /opt/ibm /liberty
 
 # Configure WebSphere Liberty
 RUN /opt/ibm/wlp/bin/server create \
diff --git a/websphere-liberty_kernel/Dockerfile b/websphere-liberty_kernel/Dockerfile
index 81405cf..d5f2677 100644
--- a/websphere-liberty_kernel/Dockerfile
+++ b/websphere-liberty_kernel/Dockerfile
@@ -40,7 +40,8 @@ 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
+    && ln -s /opt/ibm/wlp/usr/servers/defaultServer /config \
+    && ln -s /opt/ibm /liberty
 
 # Configure WebSphere Liberty
 RUN /opt/ibm/wlp/bin/server create \
@@ -48,5 +49,7 @@ RUN /opt/ibm/wlp/bin/server create \
 COPY docker-server /opt/ibm/docker/
 EXPOSE 9080 9443
 
+ENV KEYSTORE_REQUIRED true
+
 ENTRYPOINT ["/opt/ibm/docker/docker-server"]
 CMD ["/opt/ibm/wlp/bin/server", "run", "defaultServer"]
diff --git a/websphere-liberty_kernel/docker-server b/websphere-liberty_kernel/docker-server
index f118f9c..9b041f6 100755
--- a/websphere-liberty_kernel/docker-server
+++ b/websphere-liberty_kernel/docker-server
@@ -10,6 +10,12 @@ case "${LICENSE,,}" in
     cat /opt/ibm/wlp/lafiles/LI_${LANG:-en}
     exit 1
     ;;
+  "core"|"base"|"nd" ) #Attempt to install license file
+    if [ -f /etc/wlp/license/wlp-${LICENSE}-license.jar ]
+    then
+      java -jar /etc/wlp/license/wlp-${LICENSE}-license.jar --acceptLicense /opt/ibm/wlp
+    fi
+    ;;
   "" ) # Continue, displaying license message in logs
     true
     ;;
@@ -21,16 +27,20 @@ esac
 
 keystorePath="/config/configDropins/defaults/keystore.xml"
 
-if [ ! -e $keystorePath ]
+if [ "$KEYSTORE_REQUIRED" == "true" ]
 then
-  # Generate the keystore.xml
-  PASSWORD=$(openssl rand -base64 32)
-  XML="<server description=\"Default Server\"><keyStore id=\"defaultKeyStore\" password=\"$PASSWORD\" /></server>"
+  if [ ! -e $keystorePath ]
+  then
+    # Generate the keystore.xml
+    PASSWORD=$(openssl rand -base64 32)
+    XML="<server description=\"Default Server\"><keyStore id=\"defaultKeyStore\" password=\"$PASSWORD\" /></server>"
 
-  # Create the keystore.xml file and place in configDropins
-  mkdir -p $(dirname $keystorePath)
-  echo $XML > $keystorePath
+    # Create the keystore.xml file and place in configDropins
+    mkdir -p $(dirname $keystorePath)
+    echo $XML > $keystorePath
+  fi
 fi
 
+
 # Pass on to the real server run
 exec "$@"
diff --git a/websphere-liberty_latest/Dockerfile b/websphere-liberty_latest/Dockerfile
index 9f4ded7..f25f35a 100644
--- a/websphere-liberty_latest/Dockerfile
+++ b/websphere-liberty_latest/Dockerfile
@@ -28,4 +28,4 @@ RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \
 
 COPY server.xml /config/
 
-RUN server start && server stop && rm -rf /output/resources/security/ && rm -rf /output/messaging
+ONBUILD RUN server start && server stop && rm -rf /output/resources/security/ && rm -rf /output/messaging
diff --git a/websphere-liberty_microProfile/Dockerfile b/websphere-liberty_microProfile/Dockerfile
index 61627a4..5952d27 100644
--- a/websphere-liberty_microProfile/Dockerfile
+++ b/websphere-liberty_microProfile/Dockerfile
@@ -28,4 +28,4 @@ RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \
 
 COPY server.xml /config/
 
-RUN server start && server stop && rm -rf /output/resources/security/
+ONBUILD RUN server start && server stop && rm -rf /output/resources/security/
diff --git a/websphere-liberty_webProfile6/Dockerfile b/websphere-liberty_webProfile6/Dockerfile
index e01373c..2a93f4e 100644
--- a/websphere-liberty_webProfile6/Dockerfile
+++ b/websphere-liberty_webProfile6/Dockerfile
@@ -27,4 +27,4 @@ RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \
 
 COPY server.xml /config/
 
-RUN server start && server stop && rm -rf /output/resources/security/
\ No newline at end of file
+ONBUILD RUN server start && server stop && rm -rf /output/resources/security/
\ No newline at end of file
diff --git a/websphere-liberty_webProfile7/Dockerfile b/websphere-liberty_webProfile7/Dockerfile
index d9c28e2..5e12073 100644
--- a/websphere-liberty_webProfile7/Dockerfile
+++ b/websphere-liberty_webProfile7/Dockerfile
@@ -28,5 +28,5 @@ RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \
 
 COPY server.xml /config/
 
-RUN server start && server stop && rm -rf /output/resources/security/
+ONBUILD RUN server start && server stop && rm -rf /output/resources/security/
 

@tianon
Copy link
Member

tianon commented Jun 11, 2018

+ONBUILD RUN server start && server stop && rm -rf /output/resources/security/

uhhh, why are we adding ONBUILD here?

@wraschke
Copy link
Contributor Author

@tianon is that question directed towards me? If so then I am confused because nothing in my commmit references ONBUILD or any directive.

@wraschke
Copy link
Contributor Author

Oh, wait, @tianon, are you talking about change for WASdev/ci.docker@645c787#diff-b81ac9ad8d9ae47d8694681f3d1d2514?

@tianon
Copy link
Member

tianon commented Jun 12, 2018

It appears to have been added in WASdev/ci.docker#163 (which your updated commit now includes), but there's not much detail there either.

@wraschke
Copy link
Contributor Author

I'll have to let @arthurdm respond since it's his WASdev/ci.docker#163 that added it. From comments in that PR, I think it was added to fix some intermittent issues occurring in the builds, but I'm out of the loop on that situation and discussion.

@arthurdm
Copy link
Contributor

@tianon -the WebSphere Liberty image is meant to always be used as a base to another image (via FROM), so the ONBUILD allows the base image to remain smaller as it defers the server priming to happen during the parent build.

@arthurdm
Copy link
Contributor

hi @tianon - any updates on this?

@arthurdm
Copy link
Contributor

We can close this in favour of #4514

@yosifkit yosifkit closed this Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants