docker-compose 1.6 "args" attribute on "build" -
i'm trying use new "args" attribute pass variable dockerfile build. yaml parser not accepting parameter.
error: yaml.scanner.scannererror: mapping values not allowed here
for version 2 of docker-compose.yml requirements docker-compose 1.6+ , docker-engine 1.10+ , have both them installed.
this part of docker-compose file:
version: '2' services: solr: build: ./solr args: solr_port: 8983 volumes: - ./apps/solr-conf:/opt/solr/server/solr ports: - 8983:8983
the error refers "args" line.
the issue here build
field should specified path build context or object options, not both. if going use args
field, have specify path of build in context
field.
check below how should be:
version: '2' services: solr: build: context: ./solr args: solr_port: 8983 volumes: - ./apps/solr-conf:/opt/solr/server/solr ports: - 8983:8983
Comments
Post a Comment