21👍
I have resolved my issue on my Mac by changing
CMD ["python", "app.py"]
to
CMD python app.py
- [Django]-Django Rest Framework pagination extremely slow count
- [Django]-Getting TypeError: __init__() missing 1 required positional argument: 'on_delete' when trying to add parent table after child table with entries
- [Django]-Django – how to create a file and save it to a model's FileField?
11👍
I had the same error. But in my case it was syntax error in command.
I had a missing comma ","
CMD ["python" "app.py"]
instead of
CMD ["python", "app.py"]
Validating the yaml file format can help in this case. Can use any online yaml validator.
- [Django]-How to obtain a QuerySet of all rows, with specific fields for each one of them?
- [Django]-Is it possible to use FastAPI with Django?
- [Django]-How to check if ManyToMany field is not empty?
4👍
I had similar issue, but I didn’t have any '
or "
chars in docker run command in my case.
But I found the solution to repair that issue and maybe will help you in similar case in future:
- Clear all unnecessary whitespace chars from Dockerfile
- Clear all cached images from this Dockerfile
- Build and run new image
If you don’t clear cached images, docker will use cached image with some crazy whitespace chars, which was created the same error message like the subject of the thread.
- [Django]-How can I access environment variables directly in a Django template?
- [Django]-Allowing only super user login
- [Django]-Django Rest Framework custom response message
- [Django]-Django self-referential foreign key
- [Django]-Django – No module named _sqlite3
- [Django]-How to move a model between two Django apps (Django 1.7)
0👍
Well, I had the same issue, all I had to do was to add a comma between the elements in your CMD array.
Most devs use visual studio code to write docker file and the official docker extension does not indicate an array if a comma is not added.
Also, use double quotes always.
- [Django]-Django Rest Framework remove csrf
- [Django]-Django select only rows with duplicate field values
- [Django]-How to update an existing Conda environment with a .yml file