Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failure resolving proxy #680

Open
1 task
0xDagal opened this issue Jun 27, 2024 · 5 comments
Open
1 task

[BUG] Failure resolving proxy #680

0xDagal opened this issue Jun 27, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@0xDagal
Copy link

0xDagal commented Jun 27, 2024

Version of copa

v0.6.1-81-g2335453

Expected Behavior

Patching nginx:1.21.6 with a proxy should work.

Actual Behavior

The patch does not work:

[+] Building 12.6s (4/8)
 => resolve image config for docker-image://docker.io/library/nginx:1.21.6          7.4s
 => CACHED docker-image://docker.io/library/debian:11-slim                          4.7s
 => => resolve docker.io/library/debian:11-slim                                     4.7s
 => CACHED docker-image://docker.io/library/nginx:1.21.6                            1.4s
 => => resolve docker.io/library/nginx:1.21.6                                       1.4s
 => apt update                                                                      0.4s
 => apt install busybox-static                                                      0.1s
 => => # WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Error: process "apt install busybox-static" did not complete successfully: exit code: 100
exit status 1

Running in debug, I saw:

[debug-adapter stderr] #4 0.130 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#4 0.130 
#4 0.248 Err:1 http://deb.debian.org/debian bullseye InRelease
#4 0.248   Temporary failure resolving 'my-super-proxy.com'
#4 0.323 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#4 0.323   Temporary failure resolving 'my-super-proxy.com'
#4 0.390 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#4 0.390   Temporary failure resolving 'my-super-proxy.com'
#4 0.394 Reading package lists...
#4 0.414 Building dependency tree...
#4 0.416 Reading state information...
#4 0.423 All packages are up to date.
#4 0.424 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'my-super-proxy.com'
#4 0.424 W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'my-super-proxy.com'
#4 0.424 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'my-super-proxy.com'
#4 0.424 W: Some index files failed to download. They have been ignored, or old ones used instead.
 buildkit.ExtractFileFromState buildkit.go:80
 pkgmgr.(*dpkgManager).probeDPKGStatus dpkg.go:225
 pkgmgr.(*dpkgManager).InstallUpdates dpkg.go:118

Steps To Reproduce

Run trivy on nginx:1.21.6 and name the report nginx.1.21.6.json then run a moby/buildkitd container and finally run copa patch -i nginx:1.21.6 -r nginx.1.21.6.json --addr docker-container://copa-buildkitd-1.

Are you willing to submit PRs to contribute to this bug fix?

  • Yes, I am willing to implement it.
@0xDagal 0xDagal added the bug Something isn't working label Jun 27, 2024
@ashnamehrotra
Copy link
Contributor

@0xDagal would you be able to share your setup steps for your buildkit container?

@0xDagal
Copy link
Author

0xDagal commented Jul 5, 2024

Yes, I run it in a docker-compose like so:

services:
  buildkitd:
    image: moby/buildkit:latest
    privileged: true
    entrypoint: buildkitd
    volumes:
      - ./buildkitd.toml:/etc/buildkit/buildkitd.toml

in my buildkitd.toml, there are only registry mirrors like for example:

[registry."quay.io"]
  mirrors = ["my-quay-mirror.lan"]

@ashnamehrotra
Copy link
Contributor

@0xDagal where are you getting --addr docker-container://copa-buildkitd-1 address from?

@0xDagal
Copy link
Author

0xDagal commented Jul 22, 2024

As I use my docker compose inside a directory named copa when running docker compose up the buildkitd container address will be copa-builkitd-1

@ashnamehrotra
Copy link
Contributor

@0xDagal that should work. Can you confirm that docker and buildkit are up to date?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants