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

Compose support flow sequence written as a comma separated list within square brackets? #2750

Closed
ruffsl opened this issue Jan 26, 2016 · 2 comments

Comments

@ruffsl
Copy link

ruffsl commented Jan 26, 2016

I'm just testing a simple foo bar example using variable substitution:

test:
  image: ubuntu
  volumes: ${FOO_BAR}
  command: ping 127.0.0.1

but am encountering this:

$ mkdir /tmp/foo
$ mkdir /tmp/bar
$ export FOO_BAR="['/tmp/bar:/bar', '/tmp/foo:/foo']"
$ docker-compose up
ERROR: Validation failed in file './docker-compose.yml', reason(s):
Service 'test' configuration key 'volumes' contains an invalid type, it should be an array

Does compose support this YAML spec, or am I doing something improper?
http://yaml.org/spec/1.2/spec.html#id2759963
relevant context: NVIDIA/nvidia-docker#39

@dnephin
Copy link

dnephin commented Jan 26, 2016

This is the same idea as #2730, only scalar strings are supported. You could set a single value, or have a variable for each, but you can't set an array in a variable.

@tiry
Copy link

tiry commented Jan 26, 2016

This is indeed the same issue.
Looks like based on the service_schema jsonschema we could try an "automatic cast" after the interpolation.

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

No branches or pull requests

4 participants