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

Adding docker capability support to docker driver #465

Merged
merged 2 commits into from Sep 12, 2016

Conversation

milosgajdos
Copy link
Contributor

This commit adds cap_drop and cap_add support to molecule's docker driver. Capability support has been available in docker-py since version 1.2. Adding and dropping docker capabilities is needed when testing services that require to be managed by systemd. You can read a bit about the background here and here. This PR also removes some empty space characters from tox configuration - sorry, I have an OCD :-)

This commit adds cap_drop and cap_add support to docker driver. Adding
and dropping docker capabilities is sometimes needed when testing
containers that require to be managed by systemd. This commit also
removes empty space characters from tox configuration :-)
@retr0h
Copy link
Contributor

retr0h commented Sep 12, 2016

@milosgajdos83 thanks for the PR. Could you also update the docker driver documentation as well.

@retr0h
Copy link
Contributor

retr0h commented Sep 12, 2016

sorry, I have an OCD :-)

No apologies, I'm glad you caught those white space terds. I too have OCD 😸 .

@retr0h
Copy link
Contributor

retr0h commented Sep 12, 2016

Also, we offer privileged, which has worked for me when testing systemd based services.

Is priveleged more of a sledge hammer approach, and setting through cap a better option?

@milosgajdos
Copy link
Contributor Author

milosgajdos commented Sep 12, 2016

Privileged mode can actually "mess" things up a bit in terms of security. I had a chat with @justincormack from Docker who explicitly told me to avoid it as it leads to insecure Docker containers. Adding and dropping capabilities is the best way.

@retr0h
Copy link
Contributor

retr0h commented Sep 12, 2016

  syntax: commands succeeded
  py27-ansible19-unit: commands succeeded
  py27-ansible19-functional: commands succeeded
  py27-ansible20-unit: commands succeeded
  py27-ansible20-functional: commands succeeded
  py27-ansible21-unit: commands succeeded
  py27-ansible21-functional: commands succeeded
  doc: commands succeeded
  congratulations :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants