Docker-compose 1.18.0, build 8dd22a96
# docker-compose.yml
version: '3'
services:
web:
image: nginx
x-docker-remote:
project:
name: myapp
This gives me
ERROR: The Compose file 'C:\Users\niklas\AppData\Local\Temp\tmp7732twuu.yaml' is invalid because:
Invalid top-level property "x-docker-remote". Valid top-level sections for this Compose file are: services, version, networks, volumes, and extensions starting with "x-".
You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
But the field is starting with x-. I would expect it to be simply ignored.
Support for extension fields was added in the 3.4 version of the Compose file: https://docs.docker.com/compose/compose-file/#extension-fields
You're using 3.0.
Aha, I missed that part of the docs. Thank you
Most helpful comment
Support for extension fields was added in the 3.4 version of the Compose file: https://docs.docker.com/compose/compose-file/#extension-fields
You're using 3.0.