-
Notifications
You must be signed in to change notification settings - Fork 293
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
Pack 0.30.0 fails to fetch builder with Docker engine 24.0.5 on remote host over SSH #1870
Comments
Hi @phroggyy Thanks for reporting this one, I will try to reproduce it, we have some other related tickets and I want to check if this is the same error. Once I reproduce it I will move it to ready state and try to add it to a milestone. |
Hi @matejvasek Just wanted to ping you about this error to check if have some idea, just because I think the error is being generated by the configuration at this line added by this PR |
@jjbustamante you are probably right, back then I assumed host should contain protocol, but it should not. |
it probably should be just |
@matejvasek I tried that but got the following error: > DOCKER_HOST=ssh://[email protected] pack build -p ruby-bundler --builder cnbs/sample-builder:bionic sample-remote-app
ERROR: failed to build: failed to fetch builder image 'index.docker.io/cnbs/sample-builder:bionic': error during connect: Post "http://dummy%2F/v1.38/images/create?fromImage=cnbs%2Fsample-builder&tag=bionic": ssh: rejected: connect failed (open failed)
> DOCKER_HOST=ssh://[email protected] /Users/jbustamante/go/src/github.com/buildpacks/pack/out/pack build -p ruby-bundler --builder cnbs/sample-builder:bionic sample-remote-app
ERROR: unable to parse docker host `dummy`
|
It could be possibly |
@matejvasek it seems like we don't need to set it, the client will override it for some protocols: https://github.com/moby/moby/blob/master/client/request.go#L108-L111 Or we could use the |
Actually I made a mistake with my original test, after validating that my remote docker host was actually working correctly, I tried again. I reproduced the error correctly: > DOCKER_HOST=ssh://[email protected] /Users/jbustamante/go/src/github.com/buildpacks/pack/out/pack build -p ruby-bundler --builder cnbs/sample-builder:bionic sample-remote-app
ERROR: failed to build: failed to fetch builder image 'index.docker.io/cnbs/sample-builder:bionic': error during connect: Post "http://dummy%2F/v1.38/images/create?fromImage=cnbs%2Fsample-builder&tag=bionic": http: invalid Host header I just removed the last / in Line 55 in c38f7da
and it worked > DOCKER_HOST=ssh://[email protected] /Users/jbustamante/go/src/github.com/buildpacks/pack/out/pack build -p ruby-bundler --builder cnbs/sample-builder:bionic sample-remote-app
bionic: Pulling from cnbs/sample-builder
Digest: sha256:1fbc7290c4af32a7803c084aa2e7f0b5a24a22bed6e10701791848d54fd27605
Status: Image is up to date for cnbs/sample-builder:bionic
bionic: Pulling from cnbs/sample-stack-run
Digest: sha256:22f6e78d4f4d541279069a191c27614cb3f935a5a1259e662ca5f22a85d1541a
.... |
Summary
When using
pack 0.30.0
and runningpack build
against a remote docker host (set withDOCKER_HOST
) running Docker engine 24.0.5,pack
errors with a call tohttp://dummy
.This looks like it is possibly related to docker/cli#4437 and by extension moby/moby#45942.
Reproduction
Steps
apt install pack-cli
)builder
:DOCKER_HOST=ssh://[email protected] pack build --builder=heroku/builder-classic:22
Current behavior
An error is returned
Expected behavior
I expected pack to run without errors
Environment
pack info
docker info
From running with
DOCKER_HOST=ssh://[email protected]
The text was updated successfully, but these errors were encountered: