Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-1580

DO188-16: Comp Rview Lab does not work - Can not build beeper-ui image

XMLWordPrintable

    • ILT, ROLE, VT
    • en-US (English)

      URL: https://role.rhu.redhat.com/rol-rhu/app/courses/do188-4.10/pages/ch09s02
      Reporter RHNID: alpaslank
      Section: ch09s02 - Lab: Comprehensive Review
      Language: en-US (English)
      Workaround:

      Description: Step 4.3 of Comp. Review Lab fails:

      [student@workstation beeper-ui]$ cat Containerfile
      FROM registry.ocp4.example.com:8443/ubi8/nodejs-16:1 AS builder
      USER root
      COPY . .
      RUN npm ci && \
      npm run build

      FROM registry.ocp4.example.com:8443/ubi8/nginx-118:1
      COPY nginx.conf /etc/nginx/
      COPY --from=builder /opt/app-root/src/build /usr/share/nginx/html
      CMD nginx -g "daemon off;"

       

      [student@workstation beeper-ui]$ podman build -t beeper-ui:v1 .

      [1/2] STEP 1/4: FROM registry.ocp4.example.com:8443/ubi8/nodejs-16:1 AS builder
      [1/2] STEP 2/4: USER root
      --> Using cache a851dd2a90ce067d3744301a087307e4db94b32ed9309eb637a39411f987c64c
      --> a851dd2a90c
      [1/2] STEP 3/4: COPY . .
      --> Using cache 7d8b581d181ba5d5b13d776f7d02dfd1af915da97e137a5d4e191734591ba2a7
      --> 7d8b581d181
      [1/2] STEP 4/4: RUN npm ci && npm run build
      npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
      npm WARN deprecated har-validator@5.1.5: this library is no longer supported
      npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
      npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
      npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
      npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
      npm notice
      npm notice New major version of npm available! 8.11.0 -> 9.2.0
      npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0>
      npm notice Run `npm install -g npm@9.2.0` to update!
      npm notice
      npm ERR! code ECONNREFUSED
      npm ERR! syscall connect
      npm ERR! errno ECONNREFUSED
      npm ERR! FetchError: request to http://nexus-common.apps.na410-stage.dev.nextcle.com/repository/npm-hosted/@redhattraining/beeper-ui-client/-/beeper-ui-client-1.0.0.tgz failed, reason: connect ECONNREFUSED 150.239.52.237:80
      npm ERR! at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
      npm ERR! at ClientRequest.emit (node:events:527:28)
      npm ERR! at Socket.socketErrorListener (node:_http_client:454:9)
      npm ERR! at Socket.emit (node:events:539:35)
      npm ERR! at emitErrorNT (node:internal/streams/destroy:157:8)
      npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:122:3)
      npm ERR! at processTicksAndRejections (node:internal/process/task_queues:83:21)
      npm ERR! FetchError: request to http://nexus-common.apps.na410-stage.dev.nextcle.com/repository/npm-hosted/@redhattraining/beeper-ui-client/-/beeper-ui-client-1.0.0.tgz failed, reason: connect ECONNREFUSED 150.239.52.237:80
      npm ERR! at ClientRequest.<anonymous> (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:130:14)
      npm ERR! at ClientRequest.emit (node:events:527:28)
      npm ERR! at Socket.socketErrorListener (node:_http_client:454:9)
      npm ERR! at Socket.emit (node:events:539:35)
      npm ERR! at emitErrorNT (node:internal/streams/destroy:157:8)
      npm ERR! at emitErrorCloseNT (node:internal/streams/destroy:122:3)
      npm ERR! at processTicksAndRejections (node:internal/process/task_queues:83:21)

      { npm ERR! code: 'ECONNREFUSED', npm ERR! errno: 'ECONNREFUSED', npm ERR! syscall: 'connect', npm ERR! address: '150.239.52.237', npm ERR! port: 80, npm ERR! type: 'system' npm ERR! }

      npm ERR!
      npm ERR! If you are behind a proxy, please make sure that the
      npm ERR! 'proxy' config is set properly. See: 'npm help config'

      npm ERR! A complete log of this run can be found in:
      npm ERR! /opt/app-root/src/.npm/_logs/2023-01-05T11_57_47_251Z-debug-0.log
      Error: error building at STEP "RUN npm ci && npm run build": error while running runtime: exit status 1
      [student@workstation beeper-ui]$ cat Containerfile
      FROM registry.ocp4.example.com:8443/ubi8/nodejs-16:1 AS builder
      USER root
      COPY . .
      RUN npm ci && \
      npm run build

      FROM registry.ocp4.example.com:8443/ubi8/nginx-118:1
      COPY nginx.conf /etc/nginx/
      COPY --from=builder /opt/app-root/src/build /usr/share/nginx/html
      CMD nginx -g "daemon off;"

       

            gls-curriculum-ocp-core@redhat.com PTL - OCP Platform Team
            alpaslank Alpaslan Kaplan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: