Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-142672

[Image mode] From scratch images can't build as no repo is detected

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • None
    • None
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • All
    • None

      What were you trying to do that didn't work?

      I'm trying to build RHEL Image Mode images from scratch

      What is the impact of this issue to you?

       

      Please provide the package NVR for which the bug is seen:

      How reproducible is this bug?:

      Steps to reproduce

      1. Follow instructions in 7.2 or 7.4 of the doc for a simple containerfile
      2. Try to build the container with the added capabilities

      Expected results

      Image is correctly built (works in CentOS 9/10)

      Actual results

       

      [2/2] STEP 2/7: COPY --from=builder /target-rootfs/ /
      --> f6b37cec344c
      [2/2] STEP 3/7: RUN <<EORUN (set -xeuo pipefail...)
      + dnf -y install NetworkManager openssh-server
      Error: There are no enabled repositories in "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
      Error: building at STEP "RUN <<EORUN": while running runtime: exit status 1
       

      It appears that entitlements and repositories are not propagated, hence making the build fail.

      The same containerfile, but using the Centos10 base image, correctly builds.

      [2/2] STEP 1/7: FROM scratch
      [2/2] STEP 2/7: COPY --from=builder /target-rootfs/ /
      --> 887d60882798
      [2/2] STEP 3/7: RUN <<EORUN (# Set pipefail to display failures within the heredoc and avoid false-positive successful builds....)
      + dnf -y install NetworkManager openssh-server
      CentOS Stream 10 - BaseOS                       7.1 MB/s | 6.8 MB     00:00
      CentOS Stream 10 - AppStream                    4.4 MB/s | 3.5 MB     00:00
      CentOS Stream 10 - Extras packages               20 kB/s | 8.3 kB     00:00
      Dependencies resolved.
      ================================================================================
       Package                   Arch        Version                Repository   Size
      ================================================================================
      Installing:
       NetworkManager            x86_64      1:1.55.91-1.el10       baseos      2.3 M
       openssh-server            x86_64      9.9p1-19.el10          baseos      542 k
      Installing dependencies:
       NetworkManager-libnm      x86_64      1:1.55.91-1.el10       baseos      1.9 M
       libndp                    x86_64      1.9-2.el10             baseos       38 k
       openssh                   x86_64      9.9p1-19.el10          baseos      352 k
      Installing weak dependencies:
       iputils                   x86_64      20240905-5.el10        baseos      196 kTransaction Summary
      ================================================================================
      Install  6 PackagesTotal download size: 5.3 M
      Installed size: 20 M
      Downloading Packages:
      (1/6): iputils-20240905-5.el10.x86_64.rpm       1.0 MB/s | 196 kB     00:00
      (2/6): NetworkManager-libnm-1.55.91-1.el10.x86_ 7.3 MB/s | 1.9 MB     00:00
      (3/6): NetworkManager-1.55.91-1.el10.x86_64.rpm 8.4 MB/s | 2.3 MB     00:00
      (4/6): openssh-9.9p1-19.el10.x86_64.rpm          11 MB/s | 352 kB     00:00
      (5/6): libndp-1.9-2.el10.x86_64.rpm             330 kB/s |  38 kB     00:00
      (6/6): openssh-server-9.9p1-19.el10.x86_64.rpm  8.8 MB/s | 542 kB     00:00
      --------------------------------------------------------------------------------
      Total                                           6.0 MB/s | 5.3 MB     00:00
      CentOS Stream 10 - BaseOS                       1.6 MB/s | 1.6 kB     00:00
      Importing GPG key 0x8483C65D:
       Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
       Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
       From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
      Key imported successfully
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
        Preparing        :                                                        1/1
        Installing       : openssh-9.9p1-19.el10.x86_64                           1/6
        Installing       : libndp-1.9-2.el10.x86_64                               2/6
        Installing       : iputils-20240905-5.el10.x86_64                         3/6
        Installing       : NetworkManager-libnm-1:1.55.91-1.el10.x86_64           4/6
        Running scriptlet: NetworkManager-1:1.55.91-1.el10.x86_64                 5/6
        Installing       : NetworkManager-1:1.55.91-1.el10.x86_64                 5/6
        Running scriptlet: NetworkManager-1:1.55.91-1.el10.x86_64                 5/6
      Created symlink '/etc/systemd/system/multi-user.target.wants/NetworkManager.service''/usr/lib/systemd/system/NetworkManager.service'.
      Created symlink '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service''/usr/lib/systemd/system/NetworkManager-dispatcher.service'.
      Created symlink '/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service''/usr/lib/systemd/system/NetworkManager-wait-online.service'.  Running scriptlet: openssh-server-9.9p1-19.el10.x86_64                    6/6
        Installing       : openssh-server-9.9p1-19.el10.x86_64                    6/6
        Running scriptlet: openssh-server-9.9p1-19.el10.x86_64                    6/6
      Created symlink '/etc/systemd/system/multi-user.target.wants/sshd.service''/usr/lib/systemd/system/sshd.service'.
      Installed:
        NetworkManager-1:1.55.91-1.el10.x86_64
        NetworkManager-libnm-1:1.55.91-1.el10.x86_64
        iputils-20240905-5.el10.x86_64
        libndp-1.9-2.el10.x86_64
        openssh-9.9p1-19.el10.x86_64
        openssh-server-9.9p1-19.el10.x86_64 

              walters@redhat.com Colin Walters
              alessandro.rossi Alessandro Rossi
              Colin Walters Colin Walters
              Wei Shi Wei Shi
              Gabriela Necasova Gabriela Necasova
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: