Skip to content

Commit

Permalink
chore: remove outdated dockerfiles
Browse files Browse the repository at this point in the history
Signed-off-by: Ilona Shishov <Ilona.Shishov@gmail.com>
  • Loading branch information
IlonaShishov committed Mar 25, 2024
1 parent a4e8e68 commit 21d2d8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 170 deletions.
25 changes: 8 additions & 17 deletions docker-image/Dockerfiles/Dockerfile
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

Expand All @@ -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/exhort-javascript-api@0.1.1-ea.26

# 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
Expand All @@ -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
Expand All @@ -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
99 changes: 0 additions & 99 deletions docker-image/Dockerfiles/Dockerfile.alpha

This file was deleted.

54 changes: 0 additions & 54 deletions docker-image/scripts/rhda-alpha.sh

This file was deleted.

0 comments on commit 21d2d8b

Please sign in to comment.