You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error below when passing build args as key-value pairs. See Dockerfile + docker-compose.yml below for more information:
ERROR: The Compose file './docker-compose.yml' is invalid because: services.dev.build.args contains {"goodbye": "bye"}, which is an invalid type, it should be a string
Information
Docker for Mac: version: 17.12.0-ce-mac55 (18467c0ae7afb7a736e304f991ccc1a61d67a4ab)
macOS: version 10.13.3 (build: 17D102)
logs: /tmp/F873DA0F-6DAF-44C1-A4D4-5154F96751D5/20180304-185129.tar.gz
[OK] vpnkit
[OK] vmnetd
[OK] dns
[OK] driver.amd64-linux
[OK] app
[OK] virtualization VT-X
[OK] moby
[OK] system
[OK] moby-syslog
[OK] kubernetes
[OK] env
[OK] virtualization kern.hv_support
[OK] moby-console
[OK] osxfs
[OK] logs
[OK] docker-cli
[OK] disk
You can omit the value when specifying a build argument, in which case its value at build time is the value in the environment where Compose is running.
args:
- buildno
- password
So either specify (list of strings):
args
- key=value
- key2
Or (mapping)
argskey: value
The reason it's failing in your case is because you're trying to use a "map" (key: value) inside a list (starting with - )
Expected behavior
Should be able to specify build args as key-value pairs, strings with assignment, or strings without assignment, as in: https://docs.docker.com/compose/compose-file/#args
Actual behavior
Error below when passing build args as key-value pairs. See Dockerfile + docker-compose.yml below for more information:
ERROR: The Compose file './docker-compose.yml' is invalid because: services.dev.build.args contains {"goodbye": "bye"}, which is an invalid type, it should be a string
Information
Steps to reproduce the behavior
Here's my
docker-compose.yml
and my
Dockerfile
docker-compose up
yields the error above, complaining about the type of the 'goodbye' build arg.The text was updated successfully, but these errors were encountered: