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

hack: mount docker config on gha #2805

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

crazy-max
Copy link
Member

relates to https://github.com/docker/buildx/actions/runs/11954989788/job/33326387756#step:7:311

=== FAIL: tests TestIntegration (6.56s)
    run.go:272: copied docker.io/moby/buildkit:latest to local mirror localhost:46659/moby/buildkit:buildx-stable-1
time="2024-11-21T14:15:54Z" level=info msg="trying next host - response was http.StatusNotFound" host="localhost:46659"
    run.go:321: 
        	Error Trace:	/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:321
        	            				/usr/local/go/src/sync/once.go:76
        	            				/usr/local/go/src/sync/once.go:67
        	            				/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:319
        	            				/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:203
        	Error:      	Received unexpected error:
        	            	httpReadSeeker: failed open: unexpected status code https://registry-1.docker.io/v2/amd64/busybox/manifests/sha256:023917ec6a886d0e8e15f28fb543515a5fcd8d938edb091e8147db4efed388ee: 429 Too Many Requests - Server message: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
        	            	github.com/moby/buildkit/util/contentutil.CopyChain
        	            		/src/vendor/github.com/moby/buildkit/util/contentutil/copy.go:87
        	            	github.com/moby/buildkit/util/testutil/integration.copyImagesLocal
        	            		/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:269
        	            	github.com/moby/buildkit/util/testutil/integration.runMirror
        	            		/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:358
        	            	github.com/moby/buildkit/util/testutil/integration.Run.lazyMirrorRunnerFunc.func3.1
        	            		/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:320
        	            	sync.(*Once).doSlow
        	            		/usr/local/go/src/sync/once.go:76
        	            	sync.(*Once).Do
        	            		/usr/local/go/src/sync/once.go:67
        	            	github.com/moby/buildkit/util/testutil/integration.Run.lazyMirrorRunnerFunc.func3
        	            		/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:319
        	            	github.com/moby/buildkit/util/testutil/integration.Run.func2.1
        	            		/src/vendor/github.com/moby/buildkit/util/testutil/integration/run.go:203
        	            	testing.tRunner
        	            		/usr/local/go/src/testing/testing.go:1690
        	            	runtime.goexit
        	            		/usr/local/go/src/runtime/asm_amd64.s:1700
        	Test:       	TestIntegration

@crazy-max crazy-max modified the milestones: v0.19.0, v0.20.0 Nov 21, 2024
@crazy-max crazy-max closed this Nov 26, 2024
@crazy-max crazy-max deleted the ci-mount-conf branch November 26, 2024 09:51
@crazy-max crazy-max restored the ci-mount-conf branch January 6, 2025 12:02
@crazy-max crazy-max reopened this Jan 6, 2025
@crazy-max crazy-max marked this pull request as ready for review January 6, 2025 12:21
if [ "$GITHUB_ACTIONS" = "true" ]; then
dockerConfigPath="$HOME/.docker/config.json"
if [ -f "$dockerConfigPath" ]; then
dockerConfigMount="-v $dockerConfigPath:/root/.docker/config.json:ro"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to use the --mount syntax for this, instead of the -v shorthand? (not sure if quoting is needed);

--mount type=bind,"src=$dockerConfigPath",dst=:/root/.docker/config.json,readonly

Copy link
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work because the tests itself do not read credentials from the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants