Error: Got unexpected extra argument (app.main:app) #323
-
vivekagarwal@-MacBook-Pro rwe_external_integrations % docker run -t exter-rwe:latest Error: Got unexpected extra argument (app.main:app) FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8 |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hey |
Beta Was this translation helpful? Give feedback.
-
Any update on this issue? |
Beta Was this translation helpful? Give feedback.
-
This worked for me. |
Beta Was this translation helpful? Give feedback.
-
This should also work: ENTRYPOINT ["uvicorn"]
CMD ["app.main:app", "--host", "0.0.0.0", "--port", "6565"] (otherwise you will execute |
Beta Was this translation helpful? Give feedback.
-
This Docker image expected you not to define any Now that Uvicorn supports managing workers with Because of that, I deprecated this Docker image: https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker#-warning-you-probably-dont-need-this-docker-image |
Beta Was this translation helpful? Give feedback.
This Docker image expected you not to define any
ENTRYPOINT
norCMD
. 🤓Now that Uvicorn supports managing workers with
--workers
, including restarting dead ones, there's no need for Gunicorn. That also means that it's much simpler to build a Docker image from scratch now, I updated the docs to explain it.Because of that, I deprecated this Docker image: https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker#-warning-you-probably-dont-need-this-docker-image