In file '.\docker-compose.yml', service 'version' must be a mapping not a string In file '.\docker-compose.yml', service 'version' must be a mapping not a string docker docker

In file '.\docker-compose.yml', service 'version' must be a mapping not a string


This is probably be help to all .NET developers who are creating docker-compose file in Visual Studio 2017.

Creating docker-compose file in Visual Studio 2017 was the issue.

Steps taken to solve :

  1. I used Notepadd++ and this time created a YAML file as template.
  2. Create you YML configuration.
  3. Copy to your project directory.
  4. Run docker-compose up

This helped me resolve the issue.