File size: 523 Bytes
95a881b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Use the official Python image from the Docker Hub
FROM python:3.12-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
APP_HOME=/app
# Set the working directory
WORKDIR $APP_HOME
# Copy the current directory contents into the container at /app
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Expose port 8080 to the outside world
EXPOSE 8080
# Run the application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
|