I am trying to create node and mongo service and run them in the same network using the docker compose file but it showing me this error "yaml.scanner.ScannerError: while scanning for the next token found character '\t' that cannot start any token" when i run docker-compose build command
can anyone please help me.
this is my docker-compose.yml file
version: '3'
services:
node:
build:
context: .
dockerfile: node.dockerfile
ports:
- "3000:3000"
networks:
- nodeapp-network
mongodb:
image: mongo
networks:
- nodeapp-network
networks:
nodeapp-network:
driver: bridge
Use spaces instead of tabs and the error will not persist
You may be using "tab" to indent your YAML file.
The "tab" is not permitted by the YAML specs:
To maintain portability, tab characters must not be used in indentation, since different systems treat tabs differently. Note that most modern editors may be configured so that pressing the tab key results in the insertion of an appropriate number of spaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With