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

Allow docker_container memory to have String value (eg. memory='1G'). #279

Merged
merged 1 commit into from
Mar 18, 2015

Conversation

jperville
Copy link
Contributor

This very modest PR allows String values for docker_container memory attribute.

Currently, the docker_container resource only allows Fixnum values for the attribute (in other words, memory value is implicitly in bytes) but the docker documentation says that the docker run --memory parameter supports optional units. It is also possible to specify different memory and memory+swap limits.

With this PR I can set docker.memory = '1G' or docker.memory = '150m,200m', while still allowing for Fixnum memory values as before.

@bflad
Copy link
Contributor

bflad commented Mar 18, 2015

Awesome! I'm sure a lot of people will appreciate this. Hopefully not too many folks using swap functionality. 😉

bflad added a commit that referenced this pull request Mar 18, 2015
Allow docker_container memory to have String value (eg. memory='1G').
@bflad bflad merged commit e2fac3d into sous-chefs:master Mar 18, 2015
@jperville jperville deleted the container_memory_with_unit branch April 27, 2015 11:02
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.

2 participants