-
Notifications
You must be signed in to change notification settings - Fork 287
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
new build flag --docker-host does not work as expected #1093
Comments
@matejvasek (tagging you since you wrote the PR), am I using the |
@wburningham when using On Another option would be pass your
https://nickjanetakis.com/blog/docker-tip-65-get-your-docker-hosts-ip-address-from-in-a-container |
I think I should have made |
@matejvasek so does the |
No, it doesn't. The |
I think this works as designed. The only inconvenience is that by default from build container point of view |
I guess this works because the |
@matejvasek that lines up with my understanding - that any And, yes I think this issue does point out how some underlying complexity of (Updated for clarity) |
I'm following this thread with interest as we're considering using pack in a CI/CD environment using jenkins and a remote docker daemon. Using the --docker-host parameter, I can get past the ===> ANALYZING problems, but only when using an insecure remote docker daemon. |
@jdalbis If I understand your scenario correctly, it sounds like your use-case may already be supported with current pack, without the export DOCKER_HOST=tcp://remote-host:2376
export DOCKER_CERT_PATH=/my-certs #location of your tls* certs
export DOCKER_TLS_VERIFY=1
pack build example.com/my-app:latest ... # normal params With this setup, I put together a post from a couple months back that goes into some more depth: https://medium.com/buildpacks/pack-with-a-remote-docker-daemon-41aab804b839 But the |
@matejvasek This leads me to wonder if there's a mismatch between the name of the Maybe something like Would you be ok with changing the name, and if so, do you have thoughts on a new name? Perhaps (and separately from this PR) we should even add a separate flag for setting |
We should discuss this in a sub-team sync when @micahyoung is present. |
Waiting on platform sub-team RFC from @micahyoung on this. |
We can fix this one, by solving #1338, I am going to close it in favor of the latest one. Please reopen this ticket if someone has strong feels about it |
Summary
This could be my misunderstanding of how the
--docker-host
flag should be used, so let me know if the error is on my end.I've been using the
--publish
flag for the past months and have been waiting for #988 so I could build my containers using a remote docker daemon without publishing. Now that #988 is merged I can't seem to get the--docker-host
flag to work.My builds exit early with:
Reproduction
Steps
DOCKER_HOST=tcp://127.0.0.1:2375
docker info
workspack report
shows a commit that includes the new build flag--docker-host
./pack build --publish demo/app -v --builder paketobuildpacks/builder:tiny
(The builder doesn't matter in this case since the error happens in the analyze phase trying to use docker)--publish
flag./pack build --docker-host=inherit demo/app -v --builder paketobuildpacks/builder:tiny
(The builder doesn't matter in this case since the error happens in the analyze phase trying to use docker)ERROR: failed to get previous image: Cannot connect to the Docker daemon at tcp://127.0.0.1:2375. Is the docker daemon running?
error in the ANALYZE phase../pack build --docker-host=tcp://127.0.0.1:2375 demo/app -v --builder paketobuildpacks/builder:tiny
(The builder doesn't matter in this case since the error happens in the analyze phase trying to use docker)ERROR: failed to get previous image: Cannot connect to the Docker daemon at tcp://127.0.0.1:2375. Is the docker daemon running?
error in the ANALYZE phase.Current behavior
--publish
flag work--publish
flag and using the--docker-host=inherit
flag don't work--publish
flag and using the--docker-host=tcp://127.0.0.1:2375
flag don't workExpected behavior
--publish
flag and using the--docker-host=inherit
flag do work--publish
flag and using the--docker-host=tcp://127.0.0.1:2375
flag do workEnvironment
DOCKER_HOST=tcp://127.0.0.1:2375
pack info
docker info
The text was updated successfully, but these errors were encountered: