moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
8.2k stars 1.16k forks source link

BuildKit slow when running pycompile #1785

Closed ryanseipp closed 3 years ago

ryanseipp commented 4 years ago

Partial dockerfile where issue is experienced:

FROM ubuntu:14.04 as swift

RUN apt-get update
RUN apt-get install -y software-properties-common
RUN add-apt-repository cloud-archive:liberty
RUN apt-get update
RUN apt-get install -y supervisor swift python-swiftclient rsync \
                       swift-proxy swift-object memcached python-keystoneclient \
                       python-swiftclient swift-plugin-s3 python-netifaces \
                       python-xattr python-memcache \
                       swift-account swift-container swift-object pwgen

docker version:

Client:
 Version:           19.03.13-ce
 API version:       1.40
 Go version:        go1.15.2
 Git commit:        4484c46d9d
 Built:             Sat Sep 26 12:04:46 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          19.03.13-ce
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.15.2
  Git commit:       4484c46d9d
  Built:            Sat Sep 26 12:03:35 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.1.m
  GitCommit:        c623d1b36f09f8ef6536a057bd658b3aa8632828.m
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Run with DOCKER_BUILDKIT=1 docker build --progress=plain . For reasons I can't explain, the build becomes very slow at the ubuntu install step Linking and byte-compiling packages for runtime python2.7... which runs /usr/bin/pycompile -V 2.7 /usr/lib/python2.7/dist-packages. Eventually, this task completes after ~120 seconds and slows again at the next pycompile step. I've let this run for almost 2 hours before killing the build.

Building this dockerfile with DOCKER_BUILDKIT=0 docker build . completes in 76 seconds.

I am currently unsure why BuildKit would have much worse performance installing these packages in Ubuntu than the older docker build engine. Overall, BuildKit seems to perform better for other scenarios I've faced. If there's more information I can provide to help troubleshoot this issue, please let me know.

tonistiigi commented 4 years ago

On my laptop:

[+] Building 100.9s (10/10) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                    0.1s
 => => transferring dockerfile: 555B                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                       0.1s
 => => transferring context: 2B                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/ubuntu:14.04                                                                                         2.3s
 => [1/6] FROM docker.io/library/ubuntu:14.04@sha256:63fce984528cec8714c365919882f8fb64c8a3edf23fdfa0b218a2756125456f                                   7.4s
 => => resolve docker.io/library/ubuntu:14.04@sha256:63fce984528cec8714c365919882f8fb64c8a3edf23fdfa0b218a2756125456f                                   0.0s
 => => sha256:df043b4f0cf196749a9a426080f433b76cabf6b37dde2edefef317ba54c713c7 3.35kB / 3.35kB                                                          0.0s
 => => sha256:2e6e20c8e2e69fa5c3fcc310f419975cef5fbeb6f7f2fe1374071141281b6a06 70.69MB / 70.69MB                                                        2.7s
 => => sha256:95201152d9ff9544c4fb2487c9f8cebcce9d0d2119fd3cc5e77b894f7c03877a 72.65kB / 72.65kB                                                        0.2s
 => => sha256:5f63a3b65493fda086d5cc1800f70f3fcca9fb1cc064166d937a790be6adf665 162B / 162B                                                              0.4s
 => => sha256:63fce984528cec8714c365919882f8fb64c8a3edf23fdfa0b218a2756125456f 1.20kB / 1.20kB                                                          0.0s
 => => sha256:22eb792e7202aee4895dc0ad09126c310161e4ca40d3cec70c32505cffee7f06 945B / 945B                                                              0.0s
 => => extracting sha256:2e6e20c8e2e69fa5c3fcc310f419975cef5fbeb6f7f2fe1374071141281b6a06                                                               4.0s
 => => extracting sha256:95201152d9ff9544c4fb2487c9f8cebcce9d0d2119fd3cc5e77b894f7c03877a                                                               0.0s
 => => extracting sha256:5f63a3b65493fda086d5cc1800f70f3fcca9fb1cc064166d937a790be6adf665                                                               0.0s
 => [2/6] RUN apt-get update                                                                                                                            7.4s
 => [3/6] RUN apt-get install -y software-properties-common                                                                                            11.5s
 => [4/6] RUN add-apt-repository cloud-archive:liberty                                                                                                  4.4s
 => [5/6] RUN apt-get update                                                                                                                            4.8s
 => [6/6] RUN apt-get install -y supervisor swift python-swiftclient rsync                        swift-proxy swift-object memcached python-keystonec  61.7s
 => exporting to image                                                                                                                                  1.2s
 => => exporting layers                                                                                                                                 1.2s

without buildkit: 1.10s user 0.61s system 1% cpu 1:47.31 total

So you need figure out a way for others to repro the timings you are seeing.

ryanseipp commented 4 years ago

Interesting. It does appear to be isolated to my machine then. I've tried pruning images and builder cache. Attempting to obtain more information on potential bottlenecks that would be causing the slowdown, or configuration somewhere that I messed up. When the build starts to hang, a single core is pegged at 100%, but I'm likely not getting the full picture here. Do you happen to have any advice for how to further troubleshoot this or gain better information?

steve-lorimer commented 3 years ago

I'm seeing similar slowness, and can repro with centos:7 but not centos:8 - so I'm guessing it's something to do with python-2.7?

centos:8 dockerfile:

FROM centos:8
RUN yum install -y dnf-plugins-core 

without DOCKER_BUILDKIT:

$ DOCKER_BUILDKIT=0 time docker build . --no-cache --progress plain -f dockerfile 
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM centos:8
 ---> 300e315adb2f
Step 2/2 : RUN yum install -y dnf-plugins-core
 ---> Running in 2b06d87eaf0d
CentOS Linux 8 - AppStream                       15 MB/s | 6.3 MB     00:00    
CentOS Linux 8 - BaseOS                         4.3 MB/s | 2.3 MB     00:00    
CentOS Linux 8 - Extras                          36 kB/s | 9.6 kB     00:00    
Dependencies resolved.
================================================================================
 Package                       Arch        Version            Repository   Size
================================================================================
Installing:
 dnf-plugins-core              noarch      4.0.17-5.el8       baseos       66 k
Installing dependencies:
 python3-dateutil              noarch      1:2.6.1-6.el8      baseos      251 k
 python3-dnf-plugins-core      noarch      4.0.17-5.el8       baseos      221 k
 python3-six                   noarch      1.11.0-8.el8       baseos       38 k

Transaction Summary
================================================================================
Install  4 Packages

Total download size: 576 k
Installed size: 1.4 M
Downloading Packages:
(1/4): dnf-plugins-core-4.0.17-5.el8.noarch.rpm 584 kB/s |  66 kB     00:00    
(2/4): python3-six-1.11.0-8.el8.noarch.rpm      1.3 MB/s |  38 kB     00:00    
(3/4): python3-dnf-plugins-core-4.0.17-5.el8.no 1.3 MB/s | 221 kB     00:00    
(4/4): python3-dateutil-2.6.1-6.el8.noarch.rpm  1.4 MB/s | 251 kB     00:00    
--------------------------------------------------------------------------------
Total                                           1.4 MB/s | 576 kB     00:00     
warning: /var/cache/dnf/baseos-f6a80ba95cf937f2/packages/dnf-plugins-core-4.0.17-5.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS Linux 8 - 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
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : python3-six-1.11.0-8.el8.noarch                        1/4 
  Installing       : python3-dateutil-1:2.6.1-6.el8.noarch                  2/4 
  Installing       : python3-dnf-plugins-core-4.0.17-5.el8.noarch           3/4 
  Installing       : dnf-plugins-core-4.0.17-5.el8.noarch                   4/4 
  Running scriptlet: dnf-plugins-core-4.0.17-5.el8.noarch                   4/4 
  Verifying        : dnf-plugins-core-4.0.17-5.el8.noarch                   1/4 
  Verifying        : python3-dateutil-1:2.6.1-6.el8.noarch                  2/4 
  Verifying        : python3-dnf-plugins-core-4.0.17-5.el8.noarch           3/4 
  Verifying        : python3-six-1.11.0-8.el8.noarch                        4/4 

Installed:
  dnf-plugins-core-4.0.17-5.el8.noarch                                          
  python3-dateutil-1:2.6.1-6.el8.noarch                                         
  python3-dnf-plugins-core-4.0.17-5.el8.noarch                                  
  python3-six-1.11.0-8.el8.noarch                                               

Complete!
Removing intermediate container 2b06d87eaf0d
 ---> b9036c3d08df
Successfully built b9036c3d08df
0.02user 0.02system 0:05.49elapsed 0%CPU (0avgtext+0avgdata 59504maxresident)k
0inputs+0outputs (0major+7381minor)pagefaults 0swaps

Took 0:05.49

with DOCKER_BUILDKIT:

$ DOCKER_BUILDKIT=1 time docker build . --no-cache --progress plain -f dockerfile 
#1 [internal] load build definition from dockerfile
#1 sha256:7a04ac973f71ba48d2c8fbb0a4945a4d6053732145d545ce48353d0d8ce77095
#1 transferring dockerfile: 157B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:7e58e6247efbf43dc6e2c591706028896d64cef8499f147793636480a0db10c8
#2 transferring context: 2B done
#2 DONE 0.1s

#3 [internal] load metadata for docker.io/library/centos:8
#3 sha256:0f4c16f11bd64c9382bfa626d7c8af1e8a90f6d58793a0367081f85067f800b9
#3 DONE 0.0s

#4 [1/2] FROM docker.io/library/centos:8
#4 sha256:57f576abef27c9489a1665eb1afaec8e2051c2664259961d40a8b67486ff7f38
#4 CACHED

#5 [2/2] RUN yum install -y dnf-plugins-core
#5 sha256:10444d30339e96ebc7be8ada0abd5d3db52c5968cd35196eb5cce879a85260d9
#5 0.851 CentOS Linux 8 - AppStream                       15 MB/s | 6.3 MB     00:00    
#5 2.547 CentOS Linux 8 - BaseOS                         4.0 MB/s | 2.3 MB     00:00    
#5 3.253 CentOS Linux 8 - Extras                          35 kB/s | 9.6 kB     00:00    
#5 3.903 Dependencies resolved.
#5 3.904 ================================================================================
#5 3.904  Package                       Arch        Version            Repository   Size
#5 3.904 ================================================================================
#5 3.904 Installing:
#5 3.904  dnf-plugins-core              noarch      4.0.17-5.el8       baseos       66 k
#5 3.904 Installing dependencies:
#5 3.904  python3-dateutil              noarch      1:2.6.1-6.el8      baseos      251 k
#5 3.904  python3-dnf-plugins-core      noarch      4.0.17-5.el8       baseos      221 k
#5 3.904  python3-six                   noarch      1.11.0-8.el8       baseos       38 k
#5 3.904 
#5 3.904 Transaction Summary
#5 3.904 ================================================================================
#5 3.904 Install  4 Packages
#5 3.904 
#5 3.904 Total download size: 576 k
#5 3.904 Installed size: 1.4 M
#5 3.905 Downloading Packages:
#5 4.255 (1/4): dnf-plugins-core-4.0.17-5.el8.noarch.rpm 625 kB/s |  66 kB     00:00    
#5 4.282 (2/4): python3-six-1.11.0-8.el8.noarch.rpm      1.4 MB/s |  38 kB     00:00    
#5 4.312 (3/4): python3-dateutil-2.6.1-6.el8.noarch.rpm  1.5 MB/s | 251 kB     00:00    
#5 4.328 (4/4): python3-dnf-plugins-core-4.0.17-5.el8.no 1.2 MB/s | 221 kB     00:00    
#5 4.328 --------------------------------------------------------------------------------
#5 4.328 Total                                           1.3 MB/s | 576 kB     00:00     
#5 4.329 warning: /var/cache/dnf/baseos-f6a80ba95cf937f2/packages/dnf-plugins-core-4.0.17-5.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
#5 4.330 CentOS Linux 8 - BaseOS                         1.6 MB/s | 1.6 kB     00:00    
#5 4.401 Importing GPG key 0x8483C65D:
#5 4.401  Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
#5 4.401  Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
#5 4.401  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#5 4.446 Key imported successfully
#5 4.450 Running transaction check
#5 4.461 Transaction check succeeded.
#5 4.461 Running transaction test
#5 4.498 Transaction test succeeded.
#5 4.499 Running transaction
#5 4.536   Preparing        :                                                        1/1 
#5 4.551   Installing       : python3-six-1.11.0-8.el8.noarch                        1/4 
#5 4.604   Installing       : python3-dateutil-1:2.6.1-6.el8.noarch                  2/4 
#5 4.648   Installing       : python3-dnf-plugins-core-4.0.17-5.el8.noarch           3/4 
#5 4.678   Installing       : dnf-plugins-core-4.0.17-5.el8.noarch                   4/4 
#5 4.721   Running scriptlet: dnf-plugins-core-4.0.17-5.el8.noarch                   4/4 
#5 4.765   Verifying        : dnf-plugins-core-4.0.17-5.el8.noarch                   1/4 
#5 4.765   Verifying        : python3-dateutil-1:2.6.1-6.el8.noarch                  2/4 
#5 4.765   Verifying        : python3-dnf-plugins-core-4.0.17-5.el8.noarch           3/4 
#5 4.765   Verifying        : python3-six-1.11.0-8.el8.noarch                        4/4 
#5 4.898 
#5 4.898 Installed:
#5 4.898   dnf-plugins-core-4.0.17-5.el8.noarch                                          
#5 4.898   python3-dateutil-1:2.6.1-6.el8.noarch                                         
#5 4.898   python3-dnf-plugins-core-4.0.17-5.el8.noarch                                  
#5 4.898   python3-six-1.11.0-8.el8.noarch                                               
#5 4.898 
#5 4.898 Complete!
#5 DONE 5.0s

#6 exporting to image
#6 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#6 exporting layers
#6 exporting layers 0.2s done
#6 writing image sha256:9f7482bd3e50377aa9dd224b9c9864e61cf7cad0c7e295cff8685f486cb24756 done
#6 DONE 0.2s
0.03user 0.02system 0:05.44elapsed 1%CPU (0avgtext+0avgdata 60064maxresident)k
0inputs+0outputs (0major+7574minor)pagefaults 0swaps

Took 0:05.44

centos:7 dockerfile:

FROM centos:7
RUN yum install -y dnf-plugins-core 

without DOCKER_BUILDKIT:

$ DOCKER_BUILDKIT=0 time docker build . --no-cache --progress plain -f dockerfile 
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM centos:7
 ---> 8652b9f0cb4c
Step 2/2 : RUN yum install -y dnf-plugins-core
 ---> Running in 47a5bb83fccb
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: mirror.checkdomain.de
 * extras: mirror.checkdomain.de
 * updates: mirror.alpix.eu
Resolving Dependencies
--> Running transaction check
---> Package dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
--> Processing Dependency: python2-dnf-plugins-core = 4.0.2.2-3.el7_6 for package: dnf-plugins-core-4.0.2.2-3.el7_6.noarch
--> Running transaction check
---> Package python2-dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
--> Processing Dependency: python2-hawkey >= 0.7.0 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
--> Processing Dependency: python2-dnf >= 4.0.7 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
--> Processing Dependency: python-dateutil for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
--> Running transaction check
---> Package python-dateutil.noarch 0:1.5-7.el7 will be installed
---> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed
--> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
--> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-2.el7_9.noarch
---> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed
--> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
--> Running transaction check
---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
---> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed
--> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-2.el7_9.noarch
---> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
---> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed
---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed
---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
---> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed
--> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64
--> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64
---> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
--> Running transaction check
---> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed
---> Package libreport-filesystem.x86_64 0:2.1.11-53.el7.centos will be installed
---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch      Version                 Repository  Size
================================================================================
Installing:
 dnf-plugins-core            noarch    4.0.2.2-3.el7_6         extras      51 k
Installing for dependencies:
 deltarpm                    x86_64    3.6-3.el7               base        82 k
 dnf-data                    noarch    4.0.9.2-2.el7_9         extras      51 k
 libcomps                    x86_64    0.1.8-14.el7            extras      75 k
 libdnf                      x86_64    0.22.5-2.el7_9          extras     535 k
 libmodulemd                 x86_64    1.6.3-1.el7             extras     141 k
 librepo                     x86_64    1.8.1-8.el7_9           updates     82 k
 libreport-filesystem        x86_64    2.1.11-53.el7.centos    base        41 k
 libsolv                     x86_64    0.6.34-4.el7            base       329 k
 libyaml                     x86_64    0.1.4-11.el7_0          base        55 k
 python-dateutil             noarch    1.5-7.el7               base        85 k
 python-enum34               noarch    1.0.4-1.el7             base        52 k
 python2-dnf                 noarch    4.0.9.2-2.el7_9         extras     414 k
 python2-dnf-plugins-core    noarch    4.0.2.2-3.el7_6         extras     165 k
 python2-hawkey              x86_64    0.22.5-2.el7_9          extras      71 k
 python2-libcomps            x86_64    0.1.8-14.el7            extras      47 k
 python2-libdnf              x86_64    0.22.5-2.el7_9          extras     611 k

Transaction Summary
================================================================================
Install  1 Package (+16 Dependent packages)

Total download size: 2.8 M
Installed size: 10 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/extras/packages/dnf-data-4.0.9.2-2.el7_9.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for dnf-data-4.0.9.2-2.el7_9.noarch.rpm is not installed
Public key for deltarpm-3.6-3.el7.x86_64.rpm is not installed
Public key for librepo-1.8.1-8.el7_9.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              9.7 MB/s | 2.8 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-9.2009.0.el7.centos.x86_64 (@CentOS)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libsolv-0.6.34-4.el7.x86_64                                 1/17 
  Installing : librepo-1.8.1-8.el7_9.x86_64                                2/17 
  Installing : libreport-filesystem-2.1.11-53.el7.centos.x86_64            3/17 
  Installing : dnf-data-4.0.9.2-2.el7_9.noarch                             4/17 
  Installing : python-enum34-1.0.4-1.el7.noarch                            5/17 
  Installing : python-dateutil-1.5-7.el7.noarch                            6/17 
  Installing : deltarpm-3.6-3.el7.x86_64                                   7/17 
  Installing : libcomps-0.1.8-14.el7.x86_64                                8/17 
  Installing : python2-libcomps-0.1.8-14.el7.x86_64                        9/17 
  Installing : libyaml-0.1.4-11.el7_0.x86_64                              10/17 
  Installing : libmodulemd-1.6.3-1.el7.x86_64                             11/17 
  Installing : libdnf-0.22.5-2.el7_9.x86_64                               12/17 
  Installing : python2-libdnf-0.22.5-2.el7_9.x86_64                       13/17 
  Installing : python2-hawkey-0.22.5-2.el7_9.x86_64                       14/17 
  Installing : python2-dnf-4.0.9.2-2.el7_9.noarch                         15/17 
  Installing : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch            16/17 
  Installing : dnf-plugins-core-4.0.2.2-3.el7_6.noarch                    17/17 
  Verifying  : libyaml-0.1.4-11.el7_0.x86_64                               1/17 
  Verifying  : python2-libcomps-0.1.8-14.el7.x86_64                        2/17 
  Verifying  : libcomps-0.1.8-14.el7.x86_64                                3/17 
  Verifying  : librepo-1.8.1-8.el7_9.x86_64                                4/17 
  Verifying  : dnf-plugins-core-4.0.2.2-3.el7_6.noarch                     5/17 
  Verifying  : libmodulemd-1.6.3-1.el7.x86_64                              6/17 
  Verifying  : python2-hawkey-0.22.5-2.el7_9.x86_64                        7/17 
  Verifying  : deltarpm-3.6-3.el7.x86_64                                   8/17 
  Verifying  : python-dateutil-1.5-7.el7.noarch                            9/17 
  Verifying  : dnf-data-4.0.9.2-2.el7_9.noarch                            10/17 
  Verifying  : libdnf-0.22.5-2.el7_9.x86_64                               11/17 
  Verifying  : python-enum34-1.0.4-1.el7.noarch                           12/17 
  Verifying  : python2-dnf-4.0.9.2-2.el7_9.noarch                         13/17 
  Verifying  : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch            14/17 
  Verifying  : libsolv-0.6.34-4.el7.x86_64                                15/17 
  Verifying  : libreport-filesystem-2.1.11-53.el7.centos.x86_64           16/17 
  Verifying  : python2-libdnf-0.22.5-2.el7_9.x86_64                       17/17 

Installed:
  dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6                                     

Dependency Installed:
  deltarpm.x86_64 0:3.6-3.el7                                                   
  dnf-data.noarch 0:4.0.9.2-2.el7_9                                             
  libcomps.x86_64 0:0.1.8-14.el7                                                
  libdnf.x86_64 0:0.22.5-2.el7_9                                                
  libmodulemd.x86_64 0:1.6.3-1.el7                                              
  librepo.x86_64 0:1.8.1-8.el7_9                                                
  libreport-filesystem.x86_64 0:2.1.11-53.el7.centos                            
  libsolv.x86_64 0:0.6.34-4.el7                                                 
  libyaml.x86_64 0:0.1.4-11.el7_0                                               
  python-dateutil.noarch 0:1.5-7.el7                                            
  python-enum34.noarch 0:1.0.4-1.el7                                            
  python2-dnf.noarch 0:4.0.9.2-2.el7_9                                          
  python2-dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6                             
  python2-hawkey.x86_64 0:0.22.5-2.el7_9                                        
  python2-libcomps.x86_64 0:0.1.8-14.el7                                        
  python2-libdnf.x86_64 0:0.22.5-2.el7_9                                        

Complete!
Removing intermediate container 47a5bb83fccb
 ---> b8a183ece445
Successfully built b8a183ece445
0.02user 0.02system 0:07.11elapsed 0%CPU (0avgtext+0avgdata 59356maxresident)k
0inputs+0outputs (0major+7474minor)pagefaults 0swaps

Took 0:07.11

with DOCKER_BUILDKIT:

$ DOCKER_BUILDKIT=1 time docker build . --no-cache --progress plain -f dockerfile 
#1 [internal] load build definition from dockerfile
#1 sha256:cffe0176180c045434127a39de1ff91675b4111c90cd272d8f1070e4f6d0be74
#1 transferring dockerfile: 157B done
#1 DONE 0.1s

#2 [internal] load .dockerignore
#2 sha256:6c0955148a6d886b34491c204d1e11c4cf3178d5f694a10097b0ad83f389f593
#2 transferring context: 2B done
#2 DONE 0.1s

#3 [internal] load metadata for docker.io/library/centos:7
#3 sha256:30875b35a89c8e8a29cd7cf120689bb68cdab8d769419707e07138dfe977d237
#3 DONE 0.0s

#4 [1/2] FROM docker.io/library/centos:7
#4 sha256:eccdc23ae33ff032265281cdcd61b6bcb08837a6e55df3e7dcb5aef332534337
#4 CACHED

#5 [2/2] RUN yum install -y dnf-plugins-core
#5 sha256:cd7e7e67c99d23a011310bfcd3884498b4e1757251da8bb446512f80b4b78c60
#5 0.370 Loaded plugins: fastestmirror, ovl
#5 0.444 Determining fastest mirrors
#5 0.582  * base: mirror.checkdomain.de
#5 0.583  * extras: mirror.checkdomain.de
#5 0.583  * updates: mirror.alpix.eu
#5 3.036 Resolving Dependencies
#5 3.037 --> Running transaction check
#5 3.037 ---> Package dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
#5 3.040 --> Processing Dependency: python2-dnf-plugins-core = 4.0.2.2-3.el7_6 for package: dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 3.184 --> Running transaction check
#5 3.184 ---> Package python2-dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
#5 3.185 --> Processing Dependency: python2-hawkey >= 0.7.0 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 3.188 --> Processing Dependency: python2-dnf >= 4.0.7 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 3.189 --> Processing Dependency: python-dateutil for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 3.190 --> Running transaction check
#5 3.190 ---> Package python-dateutil.noarch 0:1.5-7.el7 will be installed
#5 3.191 ---> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed
#5 3.196 --> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.197 --> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.199 --> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.200 --> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.201 --> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.202 --> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.203 --> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 3.203 ---> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed
#5 3.212 --> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.213 --> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.215 --> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.215 --> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.215 --> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.215 --> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.218 --> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 3.218 --> Running transaction check
#5 3.218 ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
#5 3.219 ---> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed
#5 3.220 --> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-2.el7_9.noarch
#5 3.220 ---> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
#5 3.223 ---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
#5 3.223 --> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
#5 3.225 ---> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed
#5 3.226 ---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed
#5 3.227 ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
#5 3.227 ---> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed
#5 3.228 --> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64
#5 3.229 --> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64
#5 3.230 ---> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
#5 3.231 --> Running transaction check
#5 3.231 ---> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed
#5 3.232 ---> Package libreport-filesystem.x86_64 0:2.1.11-53.el7.centos will be installed
#5 3.232 ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
#5 3.304 --> Finished Dependency Resolution
#5 3.309 
#5 3.309 Dependencies Resolved
#5 3.312 
#5 3.312 ================================================================================
#5 3.312  Package                     Arch      Version                 Repository  Size
#5 3.312 ================================================================================
#5 3.312 Installing:
#5 3.312  dnf-plugins-core            noarch    4.0.2.2-3.el7_6         extras      51 k
#5 3.312 Installing for dependencies:
#5 3.312  deltarpm                    x86_64    3.6-3.el7               base        82 k
#5 3.312  dnf-data                    noarch    4.0.9.2-2.el7_9         extras      51 k
#5 3.312  libcomps                    x86_64    0.1.8-14.el7            extras      75 k
#5 3.312  libdnf                      x86_64    0.22.5-2.el7_9          extras     535 k
#5 3.312  libmodulemd                 x86_64    1.6.3-1.el7             extras     141 k
#5 3.312  librepo                     x86_64    1.8.1-8.el7_9           updates     82 k
#5 3.312  libreport-filesystem        x86_64    2.1.11-53.el7.centos    base        41 k
#5 3.312  libsolv                     x86_64    0.6.34-4.el7            base       329 k
#5 3.312  libyaml                     x86_64    0.1.4-11.el7_0          base        55 k
#5 3.312  python-dateutil             noarch    1.5-7.el7               base        85 k
#5 3.312  python-enum34               noarch    1.0.4-1.el7             base        52 k
#5 3.312  python2-dnf                 noarch    4.0.9.2-2.el7_9         extras     414 k
#5 3.312  python2-dnf-plugins-core    noarch    4.0.2.2-3.el7_6         extras     165 k
#5 3.312  python2-hawkey              x86_64    0.22.5-2.el7_9          extras      71 k
#5 3.312  python2-libcomps            x86_64    0.1.8-14.el7            extras      47 k
#5 3.312  python2-libdnf              x86_64    0.22.5-2.el7_9          extras     611 k
#5 3.312 
#5 3.312 Transaction Summary
#5 3.312 ================================================================================
#5 3.312 Install  1 Package (+16 Dependent packages)
#5 3.312 
#5 3.313 Total download size: 2.8 M
#5 3.313 Installed size: 10 M
#5 3.313 Downloading packages:
#5 3.375 warning: /var/cache/yum/x86_64/7/base/packages/deltarpm-3.6-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
#5 3.375 Public key for deltarpm-3.6-3.el7.x86_64.rpm is not installed
#5 3.383 Public key for dnf-data-4.0.9.2-2.el7_9.noarch.rpm is not installed
#5 3.435 Public key for librepo-1.8.1-8.el7_9.x86_64.rpm is not installed
#5 3.580 --------------------------------------------------------------------------------
#5 3.580 Total                                               11 MB/s | 2.8 MB  00:00     
#5 3.581 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#5 3.586 Importing GPG key 0xF4A80EB5:
#5 3.586  Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
#5 3.586  Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
#5 3.586  Package    : centos-release-7-9.2009.0.el7.centos.x86_64 (@CentOS)
#5 3.586  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#5 3.620 Running transaction check
#5 3.636 Running transaction test
#5 3.651 Transaction test succeeded
#5 3.651 Running transaction
#5 3.722   Installing : libsolv-0.6.34-4.el7.x86_64                                 1/17^C
#5 CANCELED
context canceled
Command exited with non-zero status 1
0.05user 0.05system 0:31.85elapsed 0%CPU (0avgtext+0avgdata 60792maxresident)k
0inputs+0outputs (0major+7707minor)pagefaults 0swaps

Cancelled after 30s, but I can say that the installation step just takes forever!

steve-lorimer commented 3 years ago

Interestingly, it seems to be environmental - as I experience the slowness on one host, but not another. I can't for the life of my figure out what is different?!

On the "working" host:

FROM centos:7
RUN yum install -y dnf-plugins-core
$ DOCKER_BUILDKIT=1 time docker build . --no-cache --progress plain -f dockerfile 
#1 [internal] load build definition from dockerfile
#1 sha256:f583675511f049fbdf01519c535554672659e9b48ff63632ac026db024019a48
#1 transferring dockerfile: 93B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:a28c355195677d5406ffcc3d27bf464935a8bf5c26985ae30b0ad22521969005
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/centos:7
#3 sha256:30875b35a89c8e8a29cd7cf120689bb68cdab8d769419707e07138dfe977d237
#3 DONE 1.0s

#4 [1/2] FROM docker.io/library/centos:7@sha256:0f4ec88e21daf75124b8a9e5ca03c37a5e937e0e108a255d890492430789b60e
#4 sha256:a82657dc9009ab4ecab0a966d899b2972800cfe1ee9d42fc736a0cac1581ac52
#4 DONE 0.0s

#5 [2/2] RUN yum install -y dnf-plugins-core
#5 sha256:60056233d42ec37b8153e5c7920a37976493526b5e7c120f649a5da8c3d3feea
#5 0.455 Loaded plugins: fastestmirror, ovl
#5 0.682 Determining fastest mirrors
#5 1.453  * base: mirror.init7.net
#5 1.454  * extras: mirror.init7.net
#5 1.454  * updates: mirror.init7.net
#5 5.155 Resolving Dependencies
#5 5.155 --> Running transaction check
#5 5.155 ---> Package dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
#5 5.155 --> Processing Dependency: python2-dnf-plugins-core = 4.0.2.2-3.el7_6 for package: dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 5.366 --> Running transaction check
#5 5.366 ---> Package python2-dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6 will be installed
#5 5.367 --> Processing Dependency: python2-hawkey >= 0.7.0 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 5.372 --> Processing Dependency: python2-dnf >= 4.0.7 for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 5.375 --> Processing Dependency: python-dateutil for package: python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch
#5 5.376 --> Running transaction check
#5 5.376 ---> Package python-dateutil.noarch 0:1.5-7.el7 will be installed
#5 5.377 ---> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed
#5 5.381 --> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.382 --> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.385 --> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.389 --> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.390 --> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.391 --> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.392 --> Processing Dependency: deltarpm for package: python2-dnf-4.0.9.2-2.el7_9.noarch
#5 5.394 ---> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed
#5 5.411 --> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.414 --> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.417 --> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.417 --> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.419 --> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.419 --> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.422 --> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
#5 5.422 --> Running transaction check
#5 5.422 ---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
#5 5.425 ---> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed
#5 5.426 --> Processing Dependency: libreport-filesystem for package: dnf-data-4.0.9.2-2.el7_9.noarch
#5 5.427 ---> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
#5 5.431 ---> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
#5 5.432 --> Processing Dependency: libyaml-0.so.2()(64bit) for package: libmodulemd-1.6.3-1.el7.x86_64
#5 5.434 ---> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed
#5 5.437 ---> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed
#5 5.438 ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
#5 5.439 ---> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed
#5 5.441 --> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64
#5 5.442 --> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64
#5 5.442 ---> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
#5 5.445 --> Running transaction check
#5 5.445 ---> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed
#5 5.447 ---> Package libreport-filesystem.x86_64 0:2.1.11-53.el7.centos will be installed
#5 5.447 ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
#5 5.593 --> Finished Dependency Resolution
#5 5.601 
#5 5.601 Dependencies Resolved
#5 5.606 
#5 5.606 ================================================================================
#5 5.606  Package                     Arch      Version                 Repository  Size
#5 5.606 ================================================================================
#5 5.606 Installing:
#5 5.606  dnf-plugins-core            noarch    4.0.2.2-3.el7_6         extras      51 k
#5 5.606 Installing for dependencies:
#5 5.606  deltarpm                    x86_64    3.6-3.el7               base        82 k
#5 5.606  dnf-data                    noarch    4.0.9.2-2.el7_9         extras      51 k
#5 5.606  libcomps                    x86_64    0.1.8-14.el7            extras      75 k
#5 5.606  libdnf                      x86_64    0.22.5-2.el7_9          extras     535 k
#5 5.606  libmodulemd                 x86_64    1.6.3-1.el7             extras     141 k
#5 5.606  librepo                     x86_64    1.8.1-8.el7_9           updates     82 k
#5 5.606  libreport-filesystem        x86_64    2.1.11-53.el7.centos    base        41 k
#5 5.606  libsolv                     x86_64    0.6.34-4.el7            base       329 k
#5 5.606  libyaml                     x86_64    0.1.4-11.el7_0          base        55 k
#5 5.606  python-dateutil             noarch    1.5-7.el7               base        85 k
#5 5.606  python-enum34               noarch    1.0.4-1.el7             base        52 k
#5 5.606  python2-dnf                 noarch    4.0.9.2-2.el7_9         extras     414 k
#5 5.606  python2-dnf-plugins-core    noarch    4.0.2.2-3.el7_6         extras     165 k
#5 5.606  python2-hawkey              x86_64    0.22.5-2.el7_9          extras      71 k
#5 5.606  python2-libcomps            x86_64    0.1.8-14.el7            extras      47 k
#5 5.606  python2-libdnf              x86_64    0.22.5-2.el7_9          extras     611 k
#5 5.606 
#5 5.606 Transaction Summary
#5 5.606 ================================================================================
#5 5.606 Install  1 Package (+16 Dependent packages)
#5 5.606 
#5 5.607 Total download size: 2.8 M
#5 5.607 Installed size: 10 M
#5 5.607 Downloading packages:
#5 5.733 warning: /var/cache/yum/x86_64/7/base/packages/deltarpm-3.6-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
#5 5.733 Public key for deltarpm-3.6-3.el7.x86_64.rpm is not installed
#5 5.748 Public key for dnf-data-4.0.9.2-2.el7_9.noarch.rpm is not installed
#5 5.889 Public key for librepo-1.8.1-8.el7_9.x86_64.rpm is not installed
#5 6.952 --------------------------------------------------------------------------------
#5 6.952 Total                                              2.1 MB/s | 2.8 MB  00:01     
#5 6.953 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#5 6.960 Importing GPG key 0xF4A80EB5:
#5 6.960  Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
#5 6.960  Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
#5 6.960  Package    : centos-release-7-9.2009.0.el7.centos.x86_64 (@CentOS)
#5 6.960  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#5 6.977 Running transaction check
#5 6.999 Running transaction test
#5 7.020 Transaction test succeeded
#5 7.020 Running transaction
#5 7.089   Installing : libsolv-0.6.34-4.el7.x86_64                                 1/17 
#5 7.794   Installing : librepo-1.8.1-8.el7_9.x86_64                                2/17 
#5 8.519   Installing : libreport-filesystem-2.1.11-53.el7.centos.x86_64            3/17 
#5 8.528   Installing : dnf-data-4.0.9.2-2.el7_9.noarch                             4/17 
#5 8.546   Installing : python-enum34-1.0.4-1.el7.noarch                            5/17 
#5 8.569   Installing : python-dateutil-1.5-7.el7.noarch                            6/17 
#5 8.584   Installing : deltarpm-3.6-3.el7.x86_64                                   7/17 
#5 8.602   Installing : libcomps-0.1.8-14.el7.x86_64                                8/17 
#5 9.268   Installing : python2-libcomps-0.1.8-14.el7.x86_64                        9/17 
#5 9.280   Installing : libyaml-0.1.4-11.el7_0.x86_64                              10/17 
#5 9.967   Installing : libmodulemd-1.6.3-1.el7.x86_64                             11/17 
#5 10.70   Installing : libdnf-0.22.5-2.el7_9.x86_64                               12/17 
#5 11.44   Installing : python2-libdnf-0.22.5-2.el7_9.x86_64                       13/17 
#5 11.46   Installing : python2-hawkey-0.22.5-2.el7_9.x86_64                       14/17 
#5 11.55   Installing : python2-dnf-4.0.9.2-2.el7_9.noarch                         15/17 
#5 11.58   Installing : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch            16/17 
#5 11.59   Installing : dnf-plugins-core-4.0.2.2-3.el7_6.noarch                    17/17 
#5 11.60   Verifying  : libyaml-0.1.4-11.el7_0.x86_64                               1/17 
#5 11.61   Verifying  : python2-libcomps-0.1.8-14.el7.x86_64                        2/17 
#5 11.61   Verifying  : libcomps-0.1.8-14.el7.x86_64                                3/17 
#5 11.62   Verifying  : librepo-1.8.1-8.el7_9.x86_64                                4/17 
#5 11.62   Verifying  : dnf-plugins-core-4.0.2.2-3.el7_6.noarch                     5/17 
#5 11.63   Verifying  : libmodulemd-1.6.3-1.el7.x86_64                              6/17 
#5 11.63   Verifying  : python2-hawkey-0.22.5-2.el7_9.x86_64                        7/17 
#5 11.64   Verifying  : deltarpm-3.6-3.el7.x86_64                                   8/17 
#5 11.64   Verifying  : python-dateutil-1.5-7.el7.noarch                            9/17 
#5 11.65   Verifying  : dnf-data-4.0.9.2-2.el7_9.noarch                            10/17 
#5 11.65   Verifying  : libdnf-0.22.5-2.el7_9.x86_64                               11/17 
#5 11.66   Verifying  : python-enum34-1.0.4-1.el7.noarch                           12/17 
#5 11.66   Verifying  : python2-dnf-4.0.9.2-2.el7_9.noarch                         13/17 
#5 11.67   Verifying  : python2-dnf-plugins-core-4.0.2.2-3.el7_6.noarch            14/17 
#5 11.67   Verifying  : libsolv-0.6.34-4.el7.x86_64                                15/17 
#5 11.68   Verifying  : libreport-filesystem-2.1.11-53.el7.centos.x86_64           16/17 
#5 11.68   Verifying  : python2-libdnf-0.22.5-2.el7_9.x86_64                       17/17 
#5 11.71 
#5 11.71 Installed:
#5 11.71   dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6                                     
#5 11.71 
#5 11.71 Dependency Installed:
#5 11.71   deltarpm.x86_64 0:3.6-3.el7                                                   
#5 11.71   dnf-data.noarch 0:4.0.9.2-2.el7_9                                             
#5 11.71   libcomps.x86_64 0:0.1.8-14.el7                                                
#5 11.71   libdnf.x86_64 0:0.22.5-2.el7_9                                                
#5 11.71   libmodulemd.x86_64 0:1.6.3-1.el7                                              
#5 11.71   librepo.x86_64 0:1.8.1-8.el7_9                                                
#5 11.71   libreport-filesystem.x86_64 0:2.1.11-53.el7.centos                            
#5 11.71   libsolv.x86_64 0:0.6.34-4.el7                                                 
#5 11.71   libyaml.x86_64 0:0.1.4-11.el7_0                                               
#5 11.71   python-dateutil.noarch 0:1.5-7.el7                                            
#5 11.71   python-enum34.noarch 0:1.0.4-1.el7                                            
#5 11.71   python2-dnf.noarch 0:4.0.9.2-2.el7_9                                          
#5 11.71   python2-dnf-plugins-core.noarch 0:4.0.2.2-3.el7_6                             
#5 11.71   python2-hawkey.x86_64 0:0.22.5-2.el7_9                                        
#5 11.71   python2-libcomps.x86_64 0:0.1.8-14.el7                                        
#5 11.71   python2-libdnf.x86_64 0:0.22.5-2.el7_9                                        
#5 11.71 
#5 11.71 Complete!
#5 DONE 11.8s

#6 exporting to image
#6 sha256:e8c613e07b0b7ff33893b694f7759a10d42e180f2b4dc349fb57dc6b71dcab00
#6 exporting layers
#6 exporting layers 0.7s done
#6 writing image sha256:87395b1180037a99198495afc6e3b138cb86c9f82b314239c076de49ba467a9c done
#6 DONE 0.7s
0.12user 0.05system 0:13.71elapsed 1%CPU (0avgtext+0avgdata 64192maxresident)k
0inputs+8outputs (0major+8662minor)pagefaults 0swaps

Took 0:13.71

ryanseipp commented 3 years ago

Closing, as for reasons unexplained the build works quickly now, and there has been no activity for months. Perhaps it was a docker/package/etc. upgrade, or some other environment issue that has been fixed.