Skip to content

Instantly share code, notes, and snippets.

@turing85
Last active December 8, 2025 11:20
Show Gist options
  • Select an option

  • Save turing85/7c450dd048fcf2ed94fed8ad5cdc5d9f to your computer and use it in GitHub Desktop.

Select an option

Save turing85/7c450dd048fcf2ed94fed8ad5cdc5d9f to your computer and use it in GitHub Desktop.

Revisions

  1. turing85 revised this gist Dec 1, 2022. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,22 @@
    ARG MICRODIR=/microdir
    ARG PACKAGES_TO_INSTALL="java-17-openjdk-devel"

    FROM registry.access.redhat.com/ubi8-micro@sha256:eb4245271537034f69ee336a4a2b31d3fbae4048ec1db53ff89de749c35cf537 AS BASE

    FROM registry.access.redhat.com/ubi8@sha256:83c0e63f5efb64cba26be647e93bf036b8d88b774f0726936c1b956424b1abf6 AS BUILD
    ARG MICRODIR
    ARG PACKAGES_TO_INSTALL
    RUN mkdir ${MICRODIR}
    COPY --from=BASE / ${MICRODIR}
    RUN yum install \
    --installroot ${MICRODIR} \
    --releasever 8 \
    --setop install_weak_deps=false \
    -y \
    java-17-openjdk-devel
    ${PACKAGES_TO_INSTALL}
    RUN yum clean all \
    --installroot ${MICRODIR}

    FROM scratch AS IMAGE
    ARG MICRODIR
    COPY --from=BUILD ${MICRODIR}/ .
    COPY --from=BUILD ${MICRODIR}/ .
  2. turing85 revised this gist Nov 30, 2022. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion Dockerfile
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,6 @@ FROM registry.access.redhat.com/ubi8@sha256:83c0e63f5efb64cba26be647e93bf036b8d8
    ARG MICRODIR
    RUN mkdir ${MICRODIR}
    COPY --from=BASE / ${MICRODIR}
    RUN ls -lisa ${MICRODIR}
    RUN yum install \
    --installroot ${MICRODIR} \
    --releasever 8 \
  3. turing85 created this gist Nov 30, 2022.
    20 changes: 20 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ARG MICRODIR=/microdir
    FROM registry.access.redhat.com/ubi8-micro@sha256:eb4245271537034f69ee336a4a2b31d3fbae4048ec1db53ff89de749c35cf537 AS BASE

    FROM registry.access.redhat.com/ubi8@sha256:83c0e63f5efb64cba26be647e93bf036b8d88b774f0726936c1b956424b1abf6 AS BUILD
    ARG MICRODIR
    RUN mkdir ${MICRODIR}
    COPY --from=BASE / ${MICRODIR}
    RUN ls -lisa ${MICRODIR}
    RUN yum install \
    --installroot ${MICRODIR} \
    --releasever 8 \
    --setop install_weak_deps=false \
    -y \
    java-17-openjdk-devel
    RUN yum clean all \
    --installroot ${MICRODIR}

    FROM scratch AS IMAGE
    ARG MICRODIR
    COPY --from=BUILD ${MICRODIR}/ .