Skip to content

Constraint build argument types. Numbers are cast into strings.#2938

Merged
shin- merged 2 commits intodocker:masterfrom
shin-:2927-buildargs-types
Feb 18, 2016
Merged

Constraint build argument types. Numbers are cast into strings.#2938
shin- merged 2 commits intodocker:masterfrom
shin-:2927-buildargs-types

Conversation

@shin-
Copy link
Copy Markdown

@shin- shin- commented Feb 17, 2016

Numerical driver_opts are also valid and typecast into strings.

FIxes #2927

@shin- shin- added this to the 1.6.1 milestone Feb 17, 2016
Comment thread compose/config/config.py Outdated
build['args'] = resolve_build_args(build)
build['args'] = dict(
[(k, str(v)) for k, v in resolve_build_args(build).items()]
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since we do this in a couple places, could we make this a function?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done 👍

@shin- shin- force-pushed the 2927-buildargs-types branch from ee187ea to ba25db6 Compare February 17, 2016 18:42
Numerical driver_opts are also valid and typecast into strings.
Additional config tests.

Signed-off-by: Joffrey F <[email protected]>
@shin- shin- force-pushed the 2927-buildargs-types branch from ba25db6 to 1952b52 Compare February 17, 2016 19:53
Comment thread compose/config/config.py Outdated
main_file = config_details.config_files[0]
volumes = load_mapping(config_details.config_files, 'get_volumes', 'Volume')
volumes = load_volumes(config_details.config_files)
networks = load_mapping(config_details.config_files, 'get_networks', 'Network')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I just noticed we have the same issue with network.driver_opts. Probably makes sense to fix it here as well?

@shin-
Copy link
Copy Markdown
Author

shin- commented Feb 18, 2016

Updated to include network driver_opts as well.

@dnephin
Copy link
Copy Markdown

dnephin commented Feb 18, 2016

LGTM

shin- added a commit that referenced this pull request Feb 18, 2016
Constraint build argument types. Numbers are cast into strings.
@shin- shin- merged commit d3a95c2 into docker:master Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants