fastapi-logger/Dockerfile
2025-02-14 20:54:05 +01:00

19 lines
413 B
Docker

# Use an official Python image as the base
FROM python:3.10
# Set the working directory
WORKDIR /app
# Copy the application files
COPY server.py /app/
COPY requirements.txt /app/
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the application port
EXPOSE 8000
# Run the FastAPI application using Uvicorn
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]