sles15sp2 Docker Image

Hello,
I am trying to build a Docker image that is based on sle15:15.2 and I am encountering a problem that produces the following error:
Problem retrieving the repository index file for service 'container-suseconnect-zypp':

I am following this guide

My Dockerfile is as follows:

    FROM registry.suse.com/suse/sle15:15.2

    RUN zypper ref -s
    RUN zypper refs && zypper refresh
    RUN zypper -n in vim

Build Results:

    host2-vm1:~ # docker build -t sles15sp2-test sles15sp2/
    Sending build context to Docker daemon  28.38MB
    Step 1/4 : FROM registry.suse.com/suse/sle15:15.2
     ---> f8606f88e4d8
    Step 2/4 : RUN zypper ref -s
     ---> Running in 5d9c7eac019e
    Refreshing service 'container-suseconnect-zypp'.
    Warning: Skipping service 'container-suseconnect-zypp' because of the above error.
    All services have been refreshed.
    Problem retrieving the repository index file for service 'container-suseconnect-zypp':
    [container-suseconnect-zypp|file:/usr/lib/zypp/plugins/services/container-suseconnect-zypp]
    Warning: There are no enabled repositories defined.
    Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories.
    The command '/bin/sh -c zypper ref -s' returned a non-zero code: 6

I have double checked the license status of this host on https://scc.suse.com/subscriptions and it appears to be in OK.

Has anyone encountered and resolved this issue or have any suggestions on resources I can use?

Thanks
Nate

Comments

  • malcolmlewismalcolmlewis Knowledge Partner

    @nathan Hi and welcome to the Forum :)
    Is the SLE-Module-Containers15-SP2 added to your system as this contains the container-suseconnect package?

    SUSEConnect -p sle-module-containers/15.2/x86_64
    zypper install container-suseconnect
    
  • Hi,
    Thank you for responding.

    I have now added SLE-Module-Containers15-SP2 to the system.

        host-vm1:~ # SUSEConnect -p sle-module-containers/15.2/x86_64
        Registering system to SUSE Customer Center
    
        Updating system details on https://scc.suse.com ...
    
        Activating sle-module-containers 15.2 x86_64 ...
        -> Adding service to system ...
        -> Installing release package ...
    
        Successfully registered system
    

    and I have installed container-suseconnect.

        host-vm1:~ # zypper install container-suseconnect
        Refreshing service 'Basesystem_Module_15_SP2_x86_64'.
        Refreshing service 'Containers_Module_15_SP2_x86_64'.
        Refreshing service 'SUSE_Linux_Enterprise_Server_15_SP2_x86_64'.
        Refreshing service 'Server_Applications_Module_15_SP2_x86_64'.
        Building repository 'SLE-Module-Containers15-SP2-Pool' cache ......................................................[done]
        Retrieving repository 'SLE-Module-Containers15-SP2-Updates' metadata ..............................................[done]
        Building repository 'SLE-Module-Containers15-SP2-Updates' cache ...................................................[done]
        Loading repository data...
        Reading installed packages...
        Resolving package dependencies...
    
        The following NEW package is going to be installed:
          container-suseconnect
    
        1 new package to install.
        Overall download size: 3.9 MiB. Already cached: 0 B. After the operation, additional 11.3 MiB will be used.
        Continue? [y/n/v/...? shows all options] (y): y
        Retrieving package container-suseconnect-2.3.0-4.15.2.x86_64                         (1/1),   3.9 MiB ( 11.3 MiB unpacked)
        Retrieving: container-suseconnect-2.3.0-4.15.2.x86_64.rpm .............................................[done (64.0 KiB/s)]
    
        Checking for file conflicts: ......................................................................................[done]
        (1/1) Installing: container-suseconnect-2.3.0-4.15.2.x86_64 .......................................................[done]
    
    

    I was hoping I could now build the sles15sp2 container, but I get the same error message.

        host-vm1:~ # docker build -t sles15sp2-test sles15sp2/
        Sending build context to Docker daemon  418.4MB
        Step 1/4 : FROM registry.suse.com/suse/sle15:15.2
         ---> f8606f88e4d8
        Step 2/4 : RUN zypper ref -s
         ---> Running in dff587f24166
        Refreshing service 'container-suseconnect-zypp'.
        Problem retrieving the repository index file for service 'container-suseconnect-zypp':
        [container-suseconnect-zypp|file:/usr/lib/zypp/plugins/services/container-suseconnect-zypp]
        Warning: Skipping service 'container-suseconnect-zypp' because of the above error.
        All services have been refreshed.
        Warning: There are no enabled repositories defined.
        Use 'zypper addrepo' or 'zypper modifyrepo' commands to add or enable repositories.
        The command '/bin/sh -c zypper ref -s' returned a non-zero code: 6
    

    Am I missing more steps or do I need to configure something differently?

    Thanks again for your help.
    Nate

  • malcolmlewismalcolmlewis Knowledge Partner

    @nathan Hi, hmm not sure. Did you read the Announcement about the forum being closed and everything moving to https://community.suse.com I wonder if you could post over there as it will get more 'active' eyes on it. This would be the place: https://community.suse.com/topics/3776090

  • I had missed that announcement. Thank you for the link.

Sign In or Register to comment.