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

[WIP] Add a new Docker communicator #6216

Closed

Conversation

loicalbertin
Copy link
Contributor

Hi all

This PR is based on issue #4686.

The idea is to allow post-creation configuration for a Docker container using file upload and remote command execution.
This PR leverage the docker remote API to do it via the github.com/fsouza/go-dockerclient dependency

Please be tolerant as this is my very first time in Go. Any suggestions/improvements are welcome.

What's currently working:

  • File upload through docker or null resources
  • Non interactive remote command execution through docker or null resources
  • Docker connector is the default one for docker_container resources

What's currently not working:

  • I was not able to use the AttachStdin feature of the docker API I did many tests and it is still not working. Could someone have a look on this to help me?

What's may need improvements:

  • In the tar generation function for a single file I have to read the whole file to have its size (see my TODO comment). Is there a better way to do it?
  • For single file upload (also used for inline scripts) I arbitrarily set file permissions to 700 (useful for later executing this file). Maybe it could be interesting to expose a configuration parameter for this?

Thanks for your feedback.

Supported features:
  - File uploads
  - Detached execution (can't retrieve output logs)

 Remaining issues:
  - retrieve execution logs (need to bump up github.com/fsouza/go-dockerclient version)
  - Test execution in a null resource
…1a7342ad77e71ca9f9a57c5e72fb80f6b2 in order to support new content type for docker 1.10+
Supported features:
  Attached execution (now we retrieve output logs)

 Remaining issues:
  - Can't attach stdin, I don't know why...
@mildwonkey
Copy link
Contributor

Hello! In an effort to address old PRs, I am going to close this one as it's labeled [WIP] and hasn't had any activity in quite awhile. If this is still something you would like to see or work on, please open a new PR (or feature request, if there isn't one already). Thanks!

@mildwonkey mildwonkey closed this Aug 16, 2019
@ghost
Copy link

ghost commented Sep 16, 2019

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.

@ghost ghost locked and limited conversation to collaborators Sep 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants