Containerizing the application
- Refer Here for the code written in python to create a REST API (Fast API)
- To run this application, we need
- python
- uv
- dependencies to be installed
- Code to be copied
- Application runs on port 18000
- the command to start the application
uvicorn main:app --host 0.0.0.0 --port 18000oruv run main.py - Refer Here for code changes
- cd into the folder
-
Create a image
docker image build -t fastapi:1.0 . -
Containerization requires us to identify
- What is required to run this application (python, nginx, java, dotnet, nodejs)
- Any extra packages to be installed or conifgure
- where should be copy the code
- On which port does your application work
- HOw to start the application
- Refer Here and follow this tutorial to containerize node js application use only Docker official images.
