FROM python:3.9.9-alpine
RUN pip install fastapi uvicorn aiofiles fastapi-async-sqlalchemy python-multipart
EXPOSE 80
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
docker build -t myfastapi .
docker run -d --name myfastapi -p 80:80 myfastapi
docker save -o myfastapi.tar myfastapi