-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
ARG MICRODIR=/microdir | ||
ARG PACKAGES_TO_INSTALL="temurin-17-jre shadow-utils" | ||
|
||
FROM registry.access.redhat.com/ubi8 AS BUILD | ||
ARG MICRODIR | ||
ARG PACKAGES_TO_INSTALL | ||
RUN mkdir ${MICRODIR} | ||
|
||
RUN printf "[temurin-jre] \n\ | ||
name=temurin-jre \n\ | ||
baseurl=https://packages.adoptium.net/artifactory/rpm/rhel/\$releasever/\$basearch \n\ | ||
enabled=1 \n\ | ||
gpgcheck=1 \n\ | ||
gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public \n\ | ||
" > /etc/yum.repos.d/adoptium.repo | ||
|
||
RUN yum --nodocs install -y --setopt=install_weak_deps=False ${PACKAGES_TO_INSTALL} | ||
|
||
RUN yum clean all | ||
|
||
FROM registry.access.redhat.com/ubi8-micro AS REFRESH | ||
ARG MICRODIR | ||
COPY --from=BUILD /usr/lib/jvm/temurin-17-jre/ ${MICRODIR}/jre/ | ||
|
||
ENV PATH="${MICRODIR}/jre/bin:${PATH}" | ||
|
||
RUN echo "appuser:x:1001:1001::/home/appuser:/bin/sh" >> /etc/passwd && \ | ||
mkdir -p /home/appuser && \ | ||
chown 1001:1001 /home/appuser | ||
|
||
USER appuser | ||
WORKDIR /home/appuser |