Skip to content

Building of client image fails

Building of the client image fails:

$ make build
[...]
sudo docker compose -f compose.yaml -f client.yaml build --pull
[...]
 => [client-community internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                       0.0s
 => CACHED [client-community 1/7] FROM docker.io/rkrahl/opensuse:15.5@sha256:6c36defec3ffa3d0885c03501b842cbfde706d889bdde212306e6f3b270f5a7d                         0.0s
 => [client-community internal] load build context                                                                                                                    0.0s
 => => transferring context: 780B                                                                                                                                     0.0s
 => ERROR [client-community 2/7] RUN zypper --non-interactive addrepo https://download.opensuse.org/repositories/home:/Rotkraut:/Data/15.5/home:Rotkraut:Data.repo &  8.5s
------                                                                                                                                                                     
 > [client-community 2/7] RUN zypper --non-interactive addrepo https://download.opensuse.org/repositories/home:/Rotkraut:/Data/15.5/home:Rotkraut:Data.repo &&     zypper --non-interactive --gpg-auto-import-keys refresh home_Rotkraut_Data &&     zypper --non-interactive install      less    mariadb-client  python-icat-examples    python-icat-man    python311       python311-PyYAML        python311-icat  python311-lxml &&     ln -sf ../usr/share/zoneinfo/Europe/Berlin /etc/localtime:                           
0.564 Adding repository 'Scientific data (15.5)' [.....done]                                                                                                               
0.567 Repository 'Scientific data (15.5)' successfully added                                                                                                               
0.567 
0.567 URI         : https://download.opensuse.org/repositories/home:/Rotkraut:/Data/15.5/
0.567 Enabled     : Yes
0.567 GPG Check   : Yes
0.567 Autorefresh : No
0.567 Priority    : 99 (default priority)
0.567 
0.568 Repository priorities are without effect. All enabled repositories share the same priority.
2.094 Retrieving repository 'Scientific data (15.5)' metadata [.....
3.266 Warning: The gpg key signing file 'repomd.xml' has expired.
3.266   Repository:       Scientific data (15.5)
3.266   Key Fingerprint:  D34A E608 25D4 6546 3538 C95B 7933 005F E01B AA27
3.266   Key Name:         home:Rotkraut OBS Project <home:Rotkraut@build.opensuse.org>
3.266   Key Algorithm:    DSA 1024
3.266   Key Created:      Thu Apr 13 13:14:34 2023
3.266   Key Expires:      Sat Jun 21 13:14:34 2025 (EXPIRED)
3.266   Rpm Name:         gpg-pubkey-e01baa27-6438003a
3.328 .done]
3.398 Building repository 'Scientific data (15.5)' cache [....done]
3.437 Specified repositories have been refreshed.
3.761 Loading repository data...
3.772 Warning: Repository 'Update repository of openSUSE Backports' metadata expired since 2025-03-02 19:18:12 UTC.
4.307 Warning: Repository 'Main Update Repository' metadata expired since 2025-03-26 09:16:29 UTC.
4.307 
4.307     Warning: Repository metadata expired: Check if 'autorefresh' is turned on (zypper lr), otherwise
4.307     manually refresh the repository (zypper ref). If this does not solve the issue, it could be that
4.307     you are using a broken mirror or the server has actually discontinued to support the repository.
4.307 
4.307 Reading installed packages...
6.424 Resolving package dependencies...
6.497 
6.497 The following 22 NEW packages are going to be installed:
6.497   groff less libedit0 libgdbm4 libmariadb3 libpipeline1 libxslt1 libyaml-0-2 man mariadb-client mariadb-errormessages python-icat python-icat-examples python-icat-man python311 python311-PyYAML python311-cssselect python311-icat python311-lxml python311-packaging python311-suds system-user-man
6.497 
6.497 22 new packages to install.
6.497 
6.497 Package download size:     8.1 MiB
6.497 
6.497 Package install size change:
6.497               |      55.3 MiB  required by packages that will be installed
6.497     55.3 MiB  |  -      0 B    released by packages that will be removed
6.497 
6.497 Backend:  classic_rpmtrans
6.497 Continue? [y/n/v/...? shows all options] (y): y
6.610 Retrieving: python-icat-1.6.0-lp155.4.1.noarch (Scientific data (15.5)) (1/22),  35.0 KiB    
6.617 Retrieving: python-icat-1.6.0-lp155.4.1.noarch.rpm [......done]
7.563 Retrieving: python-icat-examples-1.6.0-lp155.4.1.noarch (Scientific data (15.5)) (2/22),  56.6 KiB    
7.578 Retrieving: python-icat-examples-1.6.0-lp155.4.1.noarch.rpm [.done]
7.671 Retrieving: python311-suds-1.2.0-lp155.16.1.noarch (Python packages (15.5)) (3/22), 256.4 KiB    
7.686 Retrieving: python311-suds-1.2.0-lp155.16.1.noarch.rpm [.not found]
7.753 Abort, retry, ignore? [a/r/i/...? shows all options] (a): a
7.753 File './noarch/python311-suds-1.2.0-lp155.16.1.noarch.rpm' not found on medium 'https://download.opensuse.org/repositories/home:/Rotkraut:/python-extra/15.5/'
7.754 Problem occurred during or after installation or removal of packages:
7.754 Installation has been aborted as directed.
7.754 Please see the above error message for a hint.
------
failed to solve: process "/bin/sh -c zypper --non-interactive addrepo https://download.opensuse.org/repositories/home:/Rotkraut:/Data/15.5/home:Rotkraut:Data.repo &&     zypper --non-interactive --gpg-auto-import-keys refresh home_Rotkraut_Data &&     zypper --non-interactive install \tless \tmariadb-client \tpython-icat-examples \tpython-icat-man \tpython311 \tpython311-PyYAML \tpython311-icat \tpython311-lxml &&     ln -sf ../usr/share/zoneinfo/Europe/Berlin /etc/localtime" did not complete successfully: exit code: 8
make: *** [Makefile:14: build] Fehler 17

The reason is: the client image is based on rkrahl/opensuse:15.5 which has been built the last time 4 months ago. In the meanwhile the embedded package metadata are outdated and the automatic refresh of the package repositories is disabled in the base image for performance reason. From that, the solution is obvious: need to do an explicit zypper refresh as first step in the build process.