From 488709ea96a816783057ff40ccd1b773af55ffd1 Mon Sep 17 00:00:00 2001 From: Radoslaw Szwajkowski Date: Tue, 15 Sep 2026 13:14:06 +0200 Subject: [PATCH] OCPNETUI-78: Remove unused Dockerfile.art After PR #485 both Dockerfile and Dockerfile.art are in sync. As a follow-up the ART build switched to the regular Dockerfile in PR openshift-eng/ocp-build-data#12889 Additionally: 1. remove unused ci-operator.yaml 2. increase npm registry retries and move the config to Dockerfile. Follow PR openshift/console#17173 with number of retries. Reference-Url: https://github.com/openshift/networking-console-plugin/pull/485 Reference-Url: https://github.com/openshift-eng/ocp-build-data/pull/12889 Reference-Url: https://github.com/openshift/console/pull/17173 Reference-Url: https://github.com/openshift-eng/ocp-build-data/pull/12910 Signed-off-by: Radoslaw Szwajkowski --- .ci-operator.yaml | 4 ---- .npmrc | 6 ------ Dockerfile | 11 ++++++++++- Dockerfile.art | 29 ----------------------------- 4 files changed, 10 insertions(+), 40 deletions(-) delete mode 100644 .ci-operator.yaml delete mode 100644 .npmrc delete mode 100644 Dockerfile.art diff --git a/.ci-operator.yaml b/.ci-operator.yaml deleted file mode 100644 index b5c3b86c..00000000 --- a/.ci-operator.yaml +++ /dev/null @@ -1,4 +0,0 @@ -build_root_image: - name: nodejs-18 - namespace: openshift - tag: latest \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 9cba9a0c..00000000 --- a/.npmrc +++ /dev/null @@ -1,6 +0,0 @@ -# prevent npm registry timeouts when building OKD images -# use default 5min fetch timeout and up to 1min between retries -# retry config details: https://www.npmjs.com/package/retry -fetch-retry-factor=2 -fetch-retries=5 - diff --git a/Dockerfile b/Dockerfile index b7587c87..82ac9efa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,17 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-5.0 AS b COPY . /opt/app-root/src/app WORKDIR /opt/app-root/src/app -# Install dependencies and build USER 0 + +# prevent npm registry timeouts when building OKD images +# use 10min fetch timeout and up to 1min between retries +# retry config details: https://www.npmjs.com/package/retry +RUN npm config set loglevel http +RUN npm config set fetch-timeout 600000 +RUN npm config set fetch-retries 9 +RUN npm config set fetch-retry-factor 2 + +# Install dependencies and build ENV CYPRESS_INSTALL_BINARY=0 RUN npm clean-install --ignore-scripts --no-audit && npm run build diff --git a/Dockerfile.art b/Dockerfile.art deleted file mode 100644 index b7587c87..00000000 --- a/Dockerfile.art +++ /dev/null @@ -1,29 +0,0 @@ -# Builder container -FROM registry.ci.openshift.org/ocp/builder:rhel-9-base-nodejs-openshift-5.0 AS build - -# Copy app source -COPY . /opt/app-root/src/app -WORKDIR /opt/app-root/src/app - -# Install dependencies and build -USER 0 -ENV CYPRESS_INSTALL_BINARY=0 -RUN npm clean-install --ignore-scripts --no-audit && npm run build - -# Web server container -FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 - -RUN INSTALL_PKGS="nginx" && \ - dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ - rpm -V $INSTALL_PKGS && \ - dnf -y clean all --enablerepo='*' && rm -rf /var/cache/dnf/* && \ - chown -R 1001:0 /var/lib/nginx /var/log/nginx /run && \ - chmod -R ug+rwX /var/lib/nginx /var/log/nginx /run - -# Use non-root user -USER 1001 - -COPY --from=build /opt/app-root/src/app/dist /opt/app-root/src - -# Run the server -CMD nginx -g "daemon off;"