pulp / oci_env

9 stars 33 forks source link

oci-env compose build fails COMPOSE_BINARY=docker #137

Open dosas opened 8 months ago

dosas commented 8 months ago

Versions

Note

Works with podman

Traceback

oci-env compose build 
2023-11-08 15:27:57,399 - INFO - utils.py:37 - USING /home/workspace/oci_env FOR OCI_ENV_PATH BASED ON GIT CMD OUTPUT
2023-11-08 15:27:57,400 - INFO - utils.py:37 - USING /home/workspace/oci_env FOR OCI_ENV_PATH BASED ON GIT CMD OUTPUT
2023-11-08 15:27:57,401 - INFO - utils.py:37 - USING /home/workspace/oci_env FOR OCI_ENV_PATH BASED ON GIT CMD OUTPUT
2023-11-08 15:27:57,402 - INFO - commands.py:11 - COMPOSE Namespace(is_verbose=False, env_file='', command=['build'], func=<function compose at 0x7f655fca6e80>)
pulp uses an image, skipping
Building _base
[+] Building 22.2s (7/16)                                                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 => => transferring dockerfile: 961B                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                          0.0s
 => [internal] load metadata for ghcr.io/pulp/pulp-ci-centos:latest                                                                                                                      0.0s
 => [internal] load build context                                                                                                                                                        0.0s
 => => transferring context: 811B                                                                                                                                                        0.0s
 => [ 1/12] FROM ghcr.io/pulp/pulp-ci-centos:latest                                                                                                                                      0.0s
 => CACHED [ 2/12] COPY dev_requirements.txt /dev_requirements.txt                                                                                                                       0.0s
 => ERROR [ 3/12] RUN dnf install -y which                                                                                                                                              22.1s
------                                                                                                                                                                                        
 > [ 3/12] RUN dnf install -y which:
22.01 CentOS Stream 8 - AppStream                     1.6 MB/s |  34 MB     00:20    
22.03 Error: Cannot create directory "/var/cache/dnf/appstream-97a634f7b5a0dc54/repodata": Invalid argument
------
Dockerfile:10
--------------------
   8 |     
   9 |     COPY dev_requirements.txt /dev_requirements.txt
  10 | >>> RUN dnf install -y which
  11 |     
  12 |     COPY switch_python /usr/bin/switch_python
--------------------
ERROR: failed to solve: process "/bin/sh -c dnf install -y which" did not complete successfully: exit code: 1
ERROR: Service '_base' failed to build : Build failed
gerrod3 commented 7 months ago

Can you post the output of docker version?

dosas commented 7 months ago

I already put that in the bug description

gerrod3 commented 7 months ago

I saw, I was specifically wondering what version of containerd your install was using? Here is the output of mine:

Client:
 Version:           24.0.5
 API version:       1.43
 Go version:        go1.21.0
 Git commit:        %{shortcommit_cli}
 Built:             Sun Aug 27 16:45:40 2023
 OS/Arch:           linux/amd64
 Context:           default

Server:
 Engine:
  Version:          24.0.5
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.21.0
  Git commit:       %{shortcommit_moby}
  Built:            Sun Aug 27 16:45:40 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.19
  GitCommit:        
 runc:
  Version:          1.1.8
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit: 

I had to downgrade from 1.6.23 -> 1.6.19 to get around this error. Of course I encountered this error when upgrading to Fedora 39, so it might not be the same on Ubuntu.

dosas commented 7 months ago

@gerrod3 Sorry, here is the output

Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:51 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:51 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.24
  GitCommit:        61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc:
  Version:          1.1.9
  GitCommit:        v1.1.9-0-gccaecfc
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Containerd is version 1.6.24 so I might have to downgrade too?

gerrod3 commented 7 months ago

Containerd is version 1.6.24 so I might have to downgrade too?

Maybe, you could also try upgrading to 1.7 to see if that helps too.