Skip to content

Commit

Permalink
Remove module from 22-minimal/Dockerfile.rhel10
Browse files Browse the repository at this point in the history
Pull image ubi10/nodejs-22 in case testing
container NodeJS-22 minimal

Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek committed Jan 29, 2025
1 parent 1996c74 commit 00f5433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 0 additions & 2 deletions 22-minimal/Dockerfile.rhel10
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ LABEL summary="$SUMMARY" \

# nodejs-full-i18n is included for error strings
RUN INSTALL_PKGS="nodejs nodejs-nodemon nodejs-full-i18n npm findutils tar which" && \
microdnf -y module disable nodejs && \
microdnf -y module enable nodejs:$NODEJS_VERSION && \
microdnf -y --nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
node -v | grep -qe "^v$NODEJS_VERSION\." && echo "Found VERSION $NODEJS_VERSION" && \
microdnf clean all && \
Expand Down
14 changes: 10 additions & 4 deletions test/run-minimal
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,22 @@ prepare app
check_prep_result $? app || exit
echo "Testing the production image build"

FULL_IMAGE=${FULL_IMAGE:-${IMAGE_NAME//-minimal:1/}}
FULL_IMAGE=${FULL_IMAGE:-${IMAGE_NAME//-minimal:latest/}}
# if FULL_IMAGE is not found, try to pull it, if that does not work, try to pull ubi9 one
if [ -z "$(docker images -q "$FULL_IMAGE")" ] ; then
echo "Image $FULL_IMAGE not found, trying to pull $FULL_IMAGE from registry"
docker pull "$FULL_IMAGE"
fi
if [ -z "$(docker images -q "$FULL_IMAGE")" ] ; then
echo "Image $FULL_IMAGE still not found, trying to use ubi9/nodejs-${VERSION//-minimal/}:latest and pull it"
FULL_IMAGE="ubi9/nodejs-${VERSION//-minimal/}:latest"
docker pull "$FULL_IMAGE"
if [[ "$OS" == "rhel9" ]]; then
echo "Image $FULL_IMAGE still not found, trying to use ubi9/nodejs-${VERSION//-minimal/}:latest and pull it"
FULL_IMAGE="ubi9/nodejs-${VERSION//-minimal/}:latest"
docker pull "$FULL_IMAGE"
elif [[ "$OS" == "rhel10" ]]; then
echo "Image $FULL_IMAGE still not found, trying to use ubi10/nodejs-${VERSION//-minimal/}:latest and pull it"
FULL_IMAGE="ubi10/nodejs-${VERSION//-minimal/}:latest"
docker pull "$FULL_IMAGE"
fi
fi
if [ -z "$(docker images -q "$FULL_IMAGE")" ] ; then
echo "Image $FULL_IMAGE could not be found nor pulled, giving up."
Expand Down

0 comments on commit 00f5433

Please sign in to comment.