I tried the command sudo docker compose run web django-admin startproject moneymattersweekly
, and received the following:
parsing /Users/eleahburman/Desktop/code/money-matters-weekly/docker-compose.yaml: Top-level object must be a mapping
Here is my yaml file
version: "3"
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:3000
volumes:
- .:/code
ports:
- "3000:3000"
and here is my Dockerfile:
# syntax=docker/dockerfile:1
FROM python:3
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt
COPY . /code/
What is wrong with this?
I tried adding version: "3" and version: '3' to my yaml and it did nothing. I also tried redownloading docker.