-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
WIP: Switch Docker Driver to use the API instead of CLI #4186
WIP: Switch Docker Driver to use the API instead of CLI #4186
Conversation
Ping @vancluever |
Thanks @rickard-von-essen, yeah things have been pretty busy for me on this side and I haven't had time to do any work on the builder with other commitments. I do have some code that might help with some of the above items though, I'll take some time to dig it up this evening! |
Closes #2809 |
Hey @rickard-von-essen, unfortunately I think I'm not going to have too much time to work on the builder as a whole right now, just given my current work and personal project load. I do have the code in a gist though, check out the URL below: https://gist.github.com/vancluever/51b19bf900faab62c87a750b3bf79f06 This may need some fixing for build errors and what not but it should show what the config would look like. |
Ok, thanks for letting me know. I'll have some more work on this that I can
share, hopefully soon.
…On 5 December 2016 at 16:43, Chris Marchesi ***@***.***> wrote:
Hey @rickard-von-essen </~https://github.com/rickard-von-essen>,
unfortunately I think I'm not going to have too much time to work on the
builder as a whole right now, just given my current work and personal
project load. I do have the code in a gist though, check out the URL below:
https://gist.github.com/vancluever/51b19bf900faab62c87a750b3bf79f06
This may need some fixing for build errors and what not but it should show
what the config would look like.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4186 (comment)>,
or mute the thread
</~https://github.com/notifications/unsubscribe-auth/AAiCg7KDMjCU39Ns6sMyuGsf1fGV3NIEks5rFDE3gaJpZM4K3gqb>
.
|
note to myself: closing a couple of docker issues that would be better implemented after this PR. look at referenced issues |
Does this pr needs help from somebody to get it merged? |
2d2a59b
to
4509cce
Compare
This commit switches the the Docker communicator to use the Docker API, via go-dockercilent. The functionality makes full use of the API. Upload, Download, UploadDir, and DownloadDir have been set up to work with the tar file upload/download scheme the API uses, and the use of the Exec API has allowed Start() to be heavily simplified. This should address a long-standing issue with the Docker communicator where it hung indefinitely during docker-inside-docker (nested) or docker-outside-of-docker (sibling) container provisioning. It also adds DownloadDir to the docker communicator. References: mitchellh/pakcer#3102 hashicorp#3916
This directory should no longer be necessary since all communicator functionality has been moved to the API - all file transfer and communication can be done natively now versus working around old issues via the shared volume.
Have the same problem, when running Packer inside a Docker container. |
Here is a shortcut from debug log:
|
I am getting hit by this as well: I am not doing anything fancy:
It is a bit of an contrived example, but it fails just like my original. If I knew Go, I'd lend a hand in getting things completed. Is the problem limited to just inline shell provisioners? Is there any work-around? I would hate to have to go over to dockerfiles. |
I gave this branch a spin, and it did manage to attach onto the spun-up container image and tried to execute the script (that failed, but that is stemming from issues with the amazonlinux images not matching the AMIs). |
@WeatherGod sorry didn't really follow what you tested. This PR is only partially complete and require some more work before being complete. |
I followed the instructions in the contributions guide to I'll be doing some more tests with it shortly, and I'll certainly provide more feedback if desired. Unfortunately, as I said, I have zero experience with Go (I am a Python dev, primarially), so I am afraid I can't really provide much help code-wise. |
So, I found an issue that is probably a result of the WIP nature of this PR. For my purposes to make the packer config the same between amazon-ebs and docker builders, I tweaked the |
I have the same issue as @dolobanko and ran into this pull request. @rickard-von-essen are you still working on this? |
@ktham Working on it might be a bit strong. I have very little time to spend on this right now, but I plan to finish it. The bigest problem is not just implementing the driver but that the config have to be migrated since it's tightly bound to the cli and that will require allot of work. I'm glad for any assistance we can get on this. |
I see, gotcha, when I get the time, I'll try to learn some Go and help chip in where/when I can. We'll just run Packer outside of Docker to workaround #4213 in the meantime. |
Hi there! |
It's stalled. I plan to pick it up next year if no one steps up. There is quite some work needed to migrate a template. |
Closing this for now. I'll reopen when this is getting closer to done. |
Can this be re-opened? It doesn't make sense to close an issue that hasn't been resolved. |
This is a PR. I'll reopen it when I get back to work on it. My plan is to pick this up next year. |
@rickard-von-essen almost at the aniversary, any update? :) |
@bbrala 2018 hasn't ended yet 😏. Currently no ETA. |
Hehe, ok then 😄 |
Any plans to revisit this? I think I may be seeing a related issue with a file provisioner download hanging when running with Docker for Mac. |
@markmsmith Currently I don't have any time to work on such a big thing. And I think that it would be better to add a new builder ( |
ok, thanks. I'll open an issue to track the specific problem I'm seeing. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Supersedes #3921, and includes #3922.
These things must handled/fixed:
DOCKER_TLS_VERIFY
run_command
tocommand
etc.run_command
.