From 0334b4649a30f3ec8157e5d1f447ea2516b34701 Mon Sep 17 00:00:00 2001 From: Scott J Dickerson Date: Mon, 22 Apr 2024 14:07:13 -0400 Subject: [PATCH] :ghost: [backport release-0.2] Update Dockerfile and image build Backport image build changes made on main and release-0.3 to get release-0.2 building properly. See: #1781, #1780 Follow-up to #1801, #1871 Signed-off-by: Scott J Dickerson --- .github/workflows/march-image-build-push.yml | 33 ++++++++++---------- Dockerfile | 15 +++++++-- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/march-image-build-push.yml b/.github/workflows/march-image-build-push.yml index f93448352c..b4fcc68afc 100644 --- a/.github/workflows/march-image-build-push.yml +++ b/.github/workflows/march-image-build-push.yml @@ -1,13 +1,13 @@ -name: 'Build and Push Multi-Arch Image' +name: "Build and Push Multi-Arch Image" on: workflow_dispatch: push: branches: - - 'main' - - 'release-*' + - "main" + - "release-*" tags: - - 'v*' + - "v*" concurrency: group: march-build-${{ github.ref }} @@ -17,17 +17,16 @@ jobs: push-quay: name: Build and Push Manifest runs-on: ubuntu-22.04 - strategy: - fail-fast: false steps: - - name: Checkout Push to Registry action - uses: konveyor/release-tools/build-push-quay@main - with: - architectures: "amd64, arm64, ppc64le, s390x" - containerfile: "./Dockerfile" - image_name: "tackle2-ui" - image_namespace: "konveyor" - image_registry: "quay.io" - quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }} - quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }} - ref: ${{ github.ref }} + - name: Checkout Push to Registry action + uses: konveyor/release-tools/build-push-quay@main + with: + architectures: "amd64, arm64, ppc64le, s390x" + containerfile: "./Dockerfile" + extra-args: "--ulimit nofile=4096:4096" + image_name: "tackle2-ui" + image_namespace: "konveyor" + image_registry: "quay.io" + quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }} + quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }} + ref: ${{ github.ref }} diff --git a/Dockerfile b/Dockerfile index 9cc6be7c9a..281f3995d8 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 && npm run build && npm run dist +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