my docker-compose.yml file
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
my err :
ERROR: In file './docker-compose.yml', service 'build' must be a mapping not a string.
my docker-compose.yml file
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
my err :
ERROR: In file './docker-compose.yml', service 'build' must be a mapping not a string.
Make sure you are not using TABs, but just SPACEs ( YAML does not support TABS)
Also, You have wrong indentation in your YAML file:
it should be:
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"