rancher / rancher-cleanup

172 stars 43 forks source link

error when trying to build #60

Closed frisbee23 closed 1 year ago

frisbee23 commented 1 year ago

hi, i wanted to modify the cleanup.sh to not delete prometheus (because it deletes our own prometheus). so i commented it out and tried to build the dockerimage, which fails like this - see below; any help greatly appreciated.

 make
./.dapper ci
[+] Building 85.1s (5/7)                                                                                                                            
 => [internal] load .dockerignore                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                0.0s
 => [internal] load build definition from Dockerfile.dapper3682615919                                                                          0.0s
 => => transferring dockerfile: 710B                                                                                                           0.0s
 => [internal] load metadata for registry.suse.com/bci/bci-base:15.5.36.5.32                                                                   0.2s
 => [1/4] FROM registry.suse.com/bci/bci-base:15.5.36.5.32@sha256:01b52f0afebaa57a2648670f9118ca9439bcc746c9331844a4d3359837c3afb0             3.7s
 => => resolve registry.suse.com/bci/bci-base:15.5.36.5.32@sha256:01b52f0afebaa57a2648670f9118ca9439bcc746c9331844a4d3359837c3afb0             0.0s
 => => sha256:cb18bcb473291c2aa3e9425e02fe695eb6d23698656ab80900b9f1dbc454588b 47.94MB / 47.94MB                                               1.9s
 => => sha256:01b52f0afebaa57a2648670f9118ca9439bcc746c9331844a4d3359837c3afb0 1.42kB / 1.42kB                                                 0.0s
 => => sha256:c78295d6c622cf41a7866e04911ff256892f5dd5c7df624236f5f161a0ae6ce4 539B / 539B                                                     0.0s
 => => sha256:66994928cd48bc4cadc24033737b3c1fec861d21d148463781003b44e6d3c4d4 3.20kB / 3.20kB                                                 0.0s
 => => extracting sha256:cb18bcb473291c2aa3e9425e02fe695eb6d23698656ab80900b9f1dbc454588b                                                      1.3s
 => ERROR [2/4] RUN zypper -n in git-core curl tar gzip docker wget awk hostname xz &&     zypper -n clean -a &&     rm -rf /tmp/* /var/tmp/  81.1s
------                                                                                                                                              
 > [2/4] RUN zypper -n in git-core curl tar gzip docker wget awk hostname xz &&     zypper -n clean -a &&     rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/*:
#0 0.965 Refreshing service 'container-suseconnect-zypp'.
#0 0.974 Retrieving repository 'SLE_BCI' metadata [.error]
#0 81.05 Repository 'SLE_BCI' is invalid.
#0 81.05 [SLE_BCI|https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product/] Valid metadata not found at specified URL
#0 81.05 History:
#0 81.05  - [|] Error trying to read from 'https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product/'
#0 81.05  - Download (curl) error for 'https://updates.suse.com/SUSE/Products/SLE-BCI/15-SP5/x86_64/product/content':
#0 81.05    Error code: Connection failed
#0 81.05    Error message: Could not resolve host: updates.suse.com
#0 81.05 
#0 81.05 Please check if the URIs defined for this repository are pointing to a valid repository.
#0 81.05 Some of the repositories have not been refreshed because of an error.
#0 81.05 Warning: Skipping repository 'SLE_BCI' because of the above error.
#0 81.05 Loading repository data...
#0 81.05 Reading installed packages...
#0 81.06 'curl' is already installed.
#0 81.06 Package 'curl' is not available in your repositories. Cannot reinstall, upgrade, or downgrade.
#0 81.06 'gzip' is already installed.
#0 81.06 Package 'gzip' is not available in your repositories. Cannot reinstall, upgrade, or downgrade.
#0 81.06 'tar' is already installed.
#0 81.06 Package 'tar' is not available in your repositories. Cannot reinstall, upgrade, or downgrade.
#0 81.06 'xz' not found in package names. Trying capabilities.
#0 81.06 'awk' not found in package names. Trying capabilities.
#0 81.06 'docker' not found in package names. Trying capabilities.
#0 81.06 'git-core' not found in package names. Trying capabilities.
#0 81.06 'hostname' not found in package names. Trying capabilities.
#0 81.06 'wget' not found in package names. Trying capabilities.
#0 81.06 No provider of 'xz' found.
#0 81.06 No provider of 'awk' found.
#0 81.06 No provider of 'docker' found.
#0 81.06 No provider of 'git-core' found.
#0 81.06 No provider of 'hostname' found.
#0 81.06 No provider of 'wget' found.
------
Dockerfile.dapper3682615919:6
--------------------
   5 |     
   6 | >>> RUN zypper -n in git-core curl tar gzip docker wget awk hostname xz && \
   7 | >>>     zypper -n clean -a && \
   8 | >>>     rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/*
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c zypper -n in git-core curl tar gzip docker wget awk hostname xz &&     zypper -n clean -a &&     rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/*" did not complete successfully: exit code: 104
FATA[0085] exit status 1                                
make: *** [Makefile:11: ci] Error 1
superseb commented 1 year ago

There is an issue resolving DNS within the Docker containers, see:

#0 81.05    Error message: Could not resolve host: updates.suse.com

Resolving this should resolve the issue as I can build it from current main and with your adjusted base image registry.suse.com/bci/bci-base:15.5.36.5.32

frisbee23 commented 1 year ago

thanks, i totally missed that.

On Tue, Sep 12, 2023 at 5:20 PM Sebastiaan van Steenis < @.***> wrote:

There is an issue resolving DNS within the Docker containers, see:

0 81.05 Error message: Could not resolve host: updates.suse.com

Resolving this should resolve the issue as I can build it from current main and with your adjusted base image registry.suse.com/bci/bci-base:15.5.36.5.32

— Reply to this email directly, view it on GitHub https://github.com/rancher/rancher-cleanup/issues/60#issuecomment-1715931192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFIH4QTYQYJYVDEN56WQBU3X2B4THANCNFSM6AAAAAA4U7ST2M . You are receiving this because you authored the thread.Message ID: @.***>

-- Philipp Knoll // +43 699 10485901 // @.***

superseb commented 1 year ago

Let me know if you need help on this