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

Add override_command command to platforms definition #1771

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

decentral1se
Copy link
Contributor

PR Type

  • Bugfix Pull Request

Closes #1763.

This adds a override_command key to the platforms definition. It
defaults to true. A user who wants to override the CMD directive from
their Dockerfile.j2 can specify override_command: False to have it
honoured.

This allows 3 use cases to be covered:

  • Getting the zero configuration default of bash -c ...
  • Overriding the CMD directive from the command key
  • Overriding the CMD directive from the Dockerfile.j2 and setting override_command: false

See also:

I've done some manual testing against this as well for the above use cases.

I'd really appreciate review/testing from @fabianvf and @beenje!

Copy link
Contributor

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly for me, made one super minor documentation note

molecule/driver/docker.py Outdated Show resolved Hide resolved
@beenje
Copy link
Contributor

beenje commented Feb 23, 2019

This looks good to me! Thanks!

@decentral1se
Copy link
Contributor Author

Thank you both! I'll fixup the docs and re-run the CI and merge if no one else has further comment 👍

Closes ansible#1763.

This adds a `override_command` key to the platforms definition. It
defaults to true. A user who wants to override the `CMD` directive from
their `Dockerfile.j2` can specify `override_command: False` to have it
honoured.

This allows 3 use cases to be covered:

  * Getting the zero configuration default of `bash -c ...`
  * Overriding the `CMD` directive from the `command` key
  * Overriding the `CMD` directive from the `Dockerfile.j2` and setting `override_command: false`

See also:

  * ansible#1615
  * ansible#1614
  * ansible#1441

Signed-off-by: Luke Murphy <[email protected]>
@decentral1se decentral1se merged commit 414489e into ansible:master Feb 25, 2019
@decentral1se decentral1se deleted the save-our-cmd branch February 25, 2019 10:06
ssbarnea pushed a commit to ssbarnea/molecule that referenced this pull request Feb 27, 2019
Closes ansible#1763.

This adds a `override_command` key to the platforms definition. It
defaults to true. A user who wants to override the `CMD` directive from
their `Dockerfile.j2` can specify `override_command: False` to have it
honoured.

This allows 3 use cases to be covered:

  * Getting the zero configuration default of `bash -c ...`
  * Overriding the `CMD` directive from the `command` key
  * Overriding the `CMD` directive from the `Dockerfile.j2` and setting `override_command: false`

See also:

  * ansible#1615
  * ansible#1614
  * ansible#1441

Signed-off-by: Luke Murphy <[email protected]>
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.

Allowing empty docker command is gonna break existing roles
3 participants