24

I'm using python 3.8, Docker version 19.03.13, build 4484c46d9d 3.8

version: '3.8'
services:
  web:
    build: .
    command: python /code/manage.py runserver 0.0.0.0:8000
  volumes:
    - .:/code
  ports:
    - 8000:8000
mehrdadep
  • 972
  • 1
  • 15
  • 37
Hesham Mahmoud
  • 249
  • 1
  • 2
  • 4

5 Answers5

61

Maybe docker-compose.yml is empty

hamze_z3
  • 871
  • 8
  • 8
19

Your .yml file must be empty. Try saving the file.

Usman
  • 191
  • 1
  • 3
8

If you have just created your docker-compose.yml chances are you haven't saved it and hit docker-compose up.

Save it and try again. It should work fine

Ketan
  • 439
  • 4
  • 5
0

In case of docker-compose.dcproj project check for all the .yml files and nothing should be empty.

  1. docker-compose.override.yml
  2. docker-compose.yml
Hary
  • 5,690
  • 7
  • 42
  • 79
0

create file docker-compose.yaml that looks like the below picture and it started working docker.compose.yaml

surbhi241
  • 81
  • 1
  • 2