django – Docker image error: /bin/sh: 1: [python,: not found

django – Docker image error: /bin/sh: 1: [python,: not found

Use instead of in CMD. (Documentation)

I have resolved my issue on my Mac by changing

CMD [python, app.py]

to

CMD python app.py

django – Docker image error: /bin/sh: 1: [python,: not found

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.

Leave a Reply

Your email address will not be published. Required fields are marked *