A simple example of using Fast API in Python.
- Python 3
pip install -r requirements.txt
uvicorn app.main:app --reload
docker build -t my-fastapi-app:1.0 .
docker run --name my-fastapi-container -d -p 8000:8000 my-fastapi-app:1.0
docker tag <image-id> <docker-hub-username>/<image-name>:<tag>
docker tag my-fastapi-app:1.0 jayanth00003/my-fastapi-app:1.0
docker login
docker push <docker-hub-username>/<image-name>:<tag>
docker push jayanth00003/my-fastapi-app:1.0
http://127.0.0.1:8000/docs