| 
 | 1 | +# (C) Copyright IBM Corporation 2023.  | 
 | 2 | +#  | 
 | 3 | +# Licensed under the Apache License, Version 2.0 (the "License");  | 
 | 4 | +# you may not use this file except in compliance with the License.  | 
 | 5 | +# You may obtain a copy of the License at  | 
 | 6 | +#  | 
 | 7 | +#      http://www.apache.org/licenses/LICENSE-2.0  | 
 | 8 | +#  | 
 | 9 | +# Unless required by applicable law or agreed to in writing, software  | 
 | 10 | +# distributed under the License is distributed on an "AS IS" BASIS,  | 
 | 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  | 
 | 12 | +# See the License for the specific language governing permissions and  | 
 | 13 | +# limitations under the License.  | 
 | 14 | + | 
 | 15 | +ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.7-kernel-java8-ibmjava-ubi  | 
 | 16 | +FROM $PARENT_IMAGE AS installBundle  | 
 | 17 | + | 
 | 18 | +ARG VERBOSE=false  | 
 | 19 | +ARG REPOSITORIES_PROPERTIES=""  | 
 | 20 | + | 
 | 21 | +# If there is a local copy of the repository use that instead  | 
 | 22 | +COPY resources/ /tmp/  | 
 | 23 | + | 
 | 24 | +# Install the base bundle  | 
 | 25 | +RUN set -eux; \  | 
 | 26 | +  if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \  | 
 | 27 | +    mkdir /opt/ibm/wlp/etc/; \  | 
 | 28 | +    echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \  | 
 | 29 | +    installUtility install --acceptLicense baseBundle; \  | 
 | 30 | +    rm /opt/ibm/wlp/etc/repositories.properties; \  | 
 | 31 | +  elif [ -f /tmp/wlpRepo.zip ]; then \  | 
 | 32 | +    installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \  | 
 | 33 | +  else \  | 
 | 34 | +    installUtility install --acceptLicense baseBundle; \  | 
 | 35 | +  fi; \  | 
 | 36 | +  rm -rf /output/workarea /output/logs; \  | 
 | 37 | +  find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw;  | 
 | 38 | + | 
 | 39 | +ARG PARENT_IMAGE=icr.io/appcafe/websphere-liberty:24.0.0.7-kernel-java8-ibmjava-ubi  | 
 | 40 | +FROM $PARENT_IMAGE  | 
 | 41 | +ARG VERBOSE=false  | 
 | 42 | + | 
 | 43 | +# Copy the runtime  | 
 | 44 | +COPY --from=installBundle --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp  | 
 | 45 | + | 
 | 46 | +COPY --chown=1001:0 server.xml /config/  | 
 | 47 | + | 
 | 48 | +# Create a new SCC layer  | 
 | 49 | +RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \  | 
 | 50 | +    && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \  | 
 | 51 | +    && find /opt/ibm/wlp/output ! -path "*.classCache*" ! -perm -g=rwx -print0 | xargs -0 -r chmod g+rwx  | 
0 commit comments