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

Merged
merged 3 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 4 additions & 3 deletions .github/workflows/image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
push:
branches:
- 'main'
- 'release-*'
- "main"
- "release-*"
tags:
- 'v*'
- "v*"

concurrency:
group: build-${{ github.ref }}
Expand All @@ -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-88

# 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