-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ilona Shishov <[email protected]>
- Loading branch information
1 parent
a4e8e68
commit 21d2d8b
Showing
3 changed files
with
8 additions
and
170 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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
ARG JAVA_MINOR_PATCH_VERSION=0.2 | ||
|
||
# first stage | ||
FROM registry.access.redhat.com/ubi9/nodejs-20 as builder | ||
|
||
|
@@ -9,42 +7,41 @@ USER root | |
# assign token for reading packages from github package registry | ||
ARG PACKAGE_REGISTRY_ACCESS_TOKEN='' | ||
|
||
# install Java v21.0.1 | ||
# install Java | ||
RUN curl -kL https://download.oracle.com/java/21/archive/jdk-21.0.1_linux-x64_bin.tar.gz -o /tmp/java-package.tar.gz \ | ||
&& tar xvzf /tmp/java-package.tar.gz -C /usr/ | ||
|
||
# install Maven package manager v3.9.6 | ||
# install Maven package manager | ||
RUN curl -kL https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -o /tmp/maven-package.tar.gz \ | ||
&& tar xvzf /tmp/maven-package.tar.gz -C /usr/ | ||
|
||
# install golang package manager v1.21.5 | ||
# install golang package manager | ||
RUN curl -kL https://go.dev/dl/go1.21.5.linux-amd64.tar.gz -o /tmp/golang-package.tar.gz \ | ||
&& tar xvzf /tmp/golang-package.tar.gz -C /usr/ | ||
|
||
# install jq JSON formating tool v1.7.1 | ||
# install jq JSON formating tool | ||
RUN curl -kL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux64 -o /usr/bin/jq | ||
|
||
# copy the .npmrc file | ||
COPY configs/.npmrc . | ||
# replace placeholder with the actual environment variable | ||
RUN sed -i "s/__PACKAGE_REGISTRY_ACCESS_TOKEN__/${PACKAGE_REGISTRY_ACCESS_TOKEN}/g" ./.npmrc | ||
# install Exhort javascript API v0.1.1-ea.14 | ||
# install Exhort javascript API | ||
RUN npm install --global @RHEcosystemAppEng/[email protected] | ||
|
||
# add RHDA script | ||
COPY scripts/rhda.sh /rhda.sh | ||
|
||
ENV JDK_VERSION=jdk-21.${JAVA_MINOR_PATCH_VERSION} | ||
# assign executable permissions to all installed binaries | ||
RUN chmod +x /usr/jdk-21.0.1/bin/java \ | ||
&& chmod +x /usr/apache-maven-3.9.6/bin/mvn \ | ||
&& chmod +x /usr/go/bin/go \ | ||
&& chmod +x /usr/bin/jq \ | ||
&& chmod +x /opt/app-root/src/.npm-global/bin/exhort-javascript-api \ | ||
&& chmod +x /rhda.sh | ||
&& chmod +x /rhda.sh | ||
|
||
# use default user | ||
USER default | ||
USER default | ||
|
||
# second stage | ||
FROM registry.access.redhat.com/ubi9/nodejs-20-minimal | ||
|
@@ -60,9 +57,6 @@ ENV EXHORT_PIP_SHOW='' | |
# indicate whether to use the Minimal version selection (MVS) algorithm to select a set of module versions to use when building Go packages. | ||
ENV EXHORT_GO_MVS_LOGIC_ENABLED='false' | ||
|
||
ENV JDK_VERSION=jdk-21.${JAVA_MINOR_PATCH_VERSION} | ||
|
||
USER root | ||
# Copy java executable from the builder stage | ||
COPY --from=builder /usr/jdk-21.0.1/ /usr/jdk-21.0.1/ | ||
ENV JAVA_HOME=/usr/jdk-21.0.1 | ||
|
@@ -85,7 +79,4 @@ COPY --from=builder /usr/bin/jq /usr/bin/jq | |
COPY --from=builder /opt/app-root/src/.npm-global/ /opt/app-root/src/.npm-global/ | ||
|
||
# Copy RHDA executable script from the builder stage | ||
COPY --from=builder /rhda.sh /rhda.sh | ||
|
||
#Original UID in base image | ||
USER 1001 | ||
COPY --from=builder /rhda.sh /rhda.sh |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.