Spurious "unsupported YAML option" for not-present keys
ecs-cli warns me that it's skipping an unsupported YAML option (name=networks), but the string networks does not appear in my docker-compose.yml:
$ ecs-cli compose service up
WARN[0000] Skipping unsupported YAML option... option name=networks
WARN[0000] Skipping unsupported YAML option for service... option name=networks service name=loader
$ grep networks docker-compose.yml | wc -l
0
You can see the same warning pasted over and over into various issues.
This is because libcompose added a default network config. https://github.com/docker/libcompose/blob/master/project/project.go#L286
So does ecs support the networks / expose option now?
Support for network_mode is being actively developed.
Related to https://github.com/aws/amazon-ecs-cli/issues/267 and https://github.com/aws/amazon-ecs-cli/issues/153.
We can also look into suppressing the warning to avoid confusion about how the network field is being treated.
Also reported in #345.
Is there a workaround?
For what it's worth, I also see this for the "volumes" directive at the root level of a docker-compose file.
A simple docker-compose file with this format:
version: '2'
services:
service1:
image: XXX
volumes:
- test_volume:/opt/source/source_files
service2:
image: YYY
volumes:
- test_volume:/source_files
volumes:
test_volume:
This yields the following warning, even though when I look at the resulting task definition JSON, it looks like it successfully created the named volume "test_volume".
time="2018-01-24T22:14:11Z" level=warning msg="Skipping unsupported YAML option..." option name=volumes