Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👻 force npm9 during image build (#1781) #1787

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
node-version: ${{ env.node-version }}
cache: "npm"

- name: Force install npm@9 to match Dockerfile build container ubi9/nodejs-18:1-88
run: npm install -g npm@9

- name: Verify package-lock.json
run: ./scripts/verify_lock.mjs

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ 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"
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
Expand Down
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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-93

# Add ps package to allow liveness probe for k8s cluster
# Add tar package to allow copying files with kubectl scp
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
],
"engines": {
"node": ">=18.14.2",
"npm": ">=9.5.0"
"npm": "^9.5.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.7",
Expand Down
Loading