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

Added docker_container action :create (wrapper to 'docker create'). #242

Merged
merged 2 commits into from Nov 26, 2014

Conversation

jperville
Copy link
Contributor

This simple PR adds a new :create action to the docker_container LWRP.

The action wraps the docker create command (introduced with docker 1.3.0) which is the same as docker run except that it does not start the created container. The docker create command supports the same args as the docker run command except for a few (detach, security-opt, rm and sig-proxy if I believe the manual page).

@jperville
Copy link
Contributor Author

Please note that the current kitchen.yml on master does not run the minitest specs (no "recipe[minitest-handler]" in the different run lists). I fixed this for this PR, but to keep this PR focused I will submit the testing fixes in a separate PR.

@jperville
Copy link
Contributor Author

To make this PR usable I still need to improve the docker_container :redeploy action to make so that:

  • if the container is running then it will be redeployed with "docker run" (and will still be running after redeployment)
  • if the container is not running then it will be redeployed with "docker create" (and will still not be running after the redeployment)

If I leave the redeploy action as it is now, it may surprise the user to see a container that has been created (not run) then redeployed to be running after the redeployment.

There is a similar issue with services: when using created (not run) containers as a system services, the associated system service for the created container should not be enabled by default.

tduffield pushed a commit that referenced this pull request Nov 26, 2014
Added docker_container action :create (wrapper to 'docker create').
@tduffield tduffield merged commit 52424fc into sous-chefs:master Nov 26, 2014
@jperville jperville deleted the container-action-create branch September 21, 2015 15:52
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