Cannot start service api: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “python manage.py runserver

We Are Going To Discuss About Cannot start service api: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “python manage.py runserver. So lets Start this Python Article.

Cannot start service api: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “python manage.py runserver

  1. How to solve Cannot start service api: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “python manage.py runserver

    Based on the error message
    exec: "python manage.py runserver 0.0.0.0:8000"
    It looks like you've passed the command and it's args as a single field for docker to run. E.g. if your Dockerfile contains:
    ENTRYPOINT [ "python manage.py runserver 0.0.0.0:8000" ]
    That will look for the full string as the executable to run, not python with the first arg manage.py, but an executable named something like
    /bin/"python manage.py runserver 0.0.0.0:8000"
    Instead you'd need to separate each of these arguments:
    ENTRYPOINT [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]
    Then you get to the next issue of why you are setting the command in your compose file and if you need that.

  2. Cannot start service api: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: “python manage.py runserver

    Based on the error message
    exec: "python manage.py runserver 0.0.0.0:8000"
    It looks like you've passed the command and it's args as a single field for docker to run. E.g. if your Dockerfile contains:
    ENTRYPOINT [ "python manage.py runserver 0.0.0.0:8000" ]
    That will look for the full string as the executable to run, not python with the first arg manage.py, but an executable named something like
    /bin/"python manage.py runserver 0.0.0.0:8000"
    Instead you'd need to separate each of these arguments:
    ENTRYPOINT [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]
    Then you get to the next issue of why you are setting the command in your compose file and if you need that.

Solution 1

Based on the error message

exec: "python manage.py runserver 0.0.0.0:8000"

It looks like you’ve passed the command and it’s args as a single field for docker to run. E.g. if your Dockerfile contains:

ENTRYPOINT [ "python manage.py runserver 0.0.0.0:8000" ]

That will look for the full string as the executable to run, not python with the first arg manage.py, but an executable named something like

/bin/"python manage.py runserver 0.0.0.0:8000"

Instead you’d need to separate each of these arguments:

ENTRYPOINT [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]

Then you get to the next issue of why you are setting the command in your compose file and if you need that.

Original Author BMitch Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment