diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index 93226af123..4db993a897 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -4,10 +4,10 @@ on: workflow_dispatch: push: branches: - - 'main' - - 'release-*' + - "main" + - "release-*" tags: - - 'v*' + - "v*" concurrency: group: build-${{ github.ref }} @@ -21,9 +21,8 @@ jobs: image_name: "tackle2-ui" containerfile: "./Dockerfile" architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]' + # 2023-03-19: currently needed for npm@10 extra-args: "--ulimit nofile=4096:4096" - pre_build_cmd: | - sed -i '/RUN npm clean-install/i RUN npm install -g npm@9' Dockerfile secrets: registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }} registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 17edb1680c..c8450525ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,21 @@ +# NOTE: Since the `:latest` tag can have npm version changes, we are using +# a specific version tag. Container build errors have come up locally +# and via github action workflow when `:latest` is updated. +# +# Image info: https://catalog.redhat.com/software/containers/ubi9/nodejs-18/62e8e7ed22d1d3c2dfe2ca01 +# Relevant PRs: +# - https://github.com/konveyor/tackle2-ui/pull/1746 +# - https://github.com/konveyor/tackle2-ui/pull/1781 + # Builder image -FROM registry.access.redhat.com/ubi9/nodejs-18:latest as builder +FROM registry.access.redhat.com/ubi9/nodejs-18:1-88 as builder USER 1001 COPY --chown=1001 . . RUN npm clean-install --ignore-scripts && npm run build && npm run dist # Runner image -FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:latest +FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:1-88 # Add ps package to allow liveness probe for k8s cluster # Add tar package to allow copying files with kubectl scp diff --git a/package-lock.json b/package-lock.json index 6ccdc97416..61214d0546 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ }, "engines": { "node": ">=18.14.2", - "npm": ">=9.5.0" + "npm": "^9.5.0" } }, "client": { diff --git a/package.json b/package.json index 10e5f67dbc..fef8b741e9 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ ], "engines": { "node": ">=18.14.2", - "npm": ">=9.5.0" + "npm": "^9.5.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7",