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

Add PARENT_IMAGE build arg in Dockerfiles #573

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ then
fi
if [ ! -z "$from" ]
then
buildCommand="$buildCommand --build-arg IMAGE=$from"
buildCommand="$buildCommand --build-arg PARENT_IMAGE=$from"
fi

buildCommand="$buildCommand ."
Expand Down
6 changes: 3 additions & 3 deletions build/test-pet-clinic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMAGE=openliberty/open-liberty:kernel-slim-java8-openj9-ubi
FROM ${IMAGE} as staging
ARG PARENT_IMAGE=openliberty/open-liberty:kernel-slim-java8-openj9-ubi
FROM $PARENT_IMAGE as staging

# Copy server config so springBootUtility can be downloaded by featureUtility in the next step
COPY --chown=1001:0 server.xml /config/server.xml
Expand All @@ -14,7 +14,7 @@ RUN springBootUtility thin \
--targetThinAppPath=/staging/myThinApp.jar \
--targetLibCachePath=/staging/lib.index.cache

FROM ${IMAGE}
FROM $PARENT_IMAGE
COPY --chown=1001:0 server.xml /config/server.xml

ARG VERBOSE=false
Expand Down
4 changes: 2 additions & 2 deletions build/test-stock-quote/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMAGE=openliberty/open-liberty:kernel-slim-ubi
FROM ${IMAGE}
ARG PARENT_IMAGE=openliberty/open-liberty:kernel-slim-ubi
FROM $PARENT_IMAGE

ARG VERBOSE=false

Expand Down
4 changes: 2 additions & 2 deletions build/test-stock-trader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG IMAGE=openliberty/open-liberty:kernel-slim-ubi
FROM ${IMAGE}
ARG PARENT_IMAGE=openliberty/open-liberty:kernel-slim-ubi
FROM $PARENT_IMAGE

ARG VERBOSE=false

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/full/Dockerfile.ubi.ibmjava8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibmjava:8-ubi AS getRuntime
ARG PARENT_IMAGE=ibmjava:8-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM ibmjava:8-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/full/Dockerfile.ubi.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/full/Dockerfile.ubi.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
2 changes: 0 additions & 2 deletions releases/24.0.0.6/full/Dockerfile.ubi.openjdk21
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG PARENT_IMAGE=icr.io/appcafe/open-liberty:24.0.0.6-kernel-slim-java21-openj9-ubi-minimal

FROM $PARENT_IMAGE AS installBundle

ARG VERBOSE=false
Expand Down Expand Up @@ -33,7 +32,6 @@ RUN set -eux; \
rm -rf /output/workarea /output/logs; \
find /opt/ol/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw;

ARG PARENT_IMAGE=icr.io/appcafe/open-liberty:24.0.0.6-kernel-slim-java21-openj9-ubi-minimal
FROM $PARENT_IMAGE
ARG VERBOSE=false

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/full/Dockerfile.ubi.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/full/Dockerfile.ubuntu.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-11-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-11-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/full/Dockerfile.ubuntu.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-17-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-17-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/full/Dockerfile.ubuntu.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-8-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-8-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/kernel-slim/Dockerfile.ubi.ibmjava8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibmjava:8-ubi AS getRuntime
ARG PARENT_IMAGE=ibmjava:8-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM ibmjava:8-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/kernel-slim/Dockerfile.ubi.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/kernel-slim/Dockerfile.ubi.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/kernel-slim/Dockerfile.ubi.openjdk21
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-21-jre-ubi9-minimal AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-21-jre-ubi9-minimal
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN microdnf -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-21-jre-ubi9-minimal
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.6/kernel-slim/Dockerfile.ubi.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/kernel-slim/Dockerfile.ubuntu.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-11-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-11-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/kernel-slim/Dockerfile.ubuntu.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-17-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-17-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.6/kernel-slim/Dockerfile.ubuntu.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-8-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-8-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/full/Dockerfile.ubi.ibmjava8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibmjava:8-ubi AS getRuntime
ARG PARENT_IMAGE=ibmjava:8-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM ibmjava:8-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/full/Dockerfile.ubi.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/full/Dockerfile.ubi.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
2 changes: 0 additions & 2 deletions releases/24.0.0.9/full/Dockerfile.ubi.openjdk21
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG PARENT_IMAGE=icr.io/appcafe/open-liberty:24.0.0.9-kernel-slim-java21-openj9-ubi-minimal

FROM $PARENT_IMAGE AS installBundle

ARG VERBOSE=false
Expand Down Expand Up @@ -33,7 +32,6 @@ RUN set -eux; \
rm -rf /output/workarea /output/logs; \
find /opt/ol/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw;

ARG PARENT_IMAGE=icr.io/appcafe/open-liberty:24.0.0.9-kernel-slim-java21-openj9-ubi-minimal
FROM $PARENT_IMAGE
ARG VERBOSE=false

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/full/Dockerfile.ubi.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-8-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.9/full/Dockerfile.ubuntu.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-11-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-11-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.9/full/Dockerfile.ubuntu.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-17-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-17-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
3 changes: 2 additions & 1 deletion releases/24.0.0.9/full/Dockerfile.ubuntu.openjdk8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibm-semeru-runtimes:open-8-jre-jammy
ARG PARENT_IMAGE=ibm-semeru-runtimes:open-8-jre-jammy
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/kernel-slim/Dockerfile.ubi.ibmjava8
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ibmjava:8-ubi AS getRuntime
ARG PARENT_IMAGE=ibmjava:8-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM ibmjava:8-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/kernel-slim/Dockerfile.ubi.openjdk11
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
5 changes: 3 additions & 2 deletions releases/24.0.0.9/kernel-slim/Dockerfile.ubi.openjdk17
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi AS getRuntime
ARG PARENT_IMAGE=icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE AS getRuntime

USER root

Expand All @@ -24,7 +25,7 @@ RUN yum -y install shadow-utils wget unzip openssl \
&& chown -R 1001:0 /opt/ol/wlp \
&& chmod -R g+rw /opt/ol/wlp

FROM icr.io/appcafe/ibm-semeru-runtimes:open-17-jdk-ubi
FROM $PARENT_IMAGE

USER root

Expand Down
Loading