19 lines
362 B
Docker
19 lines
362 B
Docker
FROM python:3.10-slim
|
|
|
|
# Set the working directory
|
|
WORKDIR /app
|
|
|
|
# Copy the requirements file
|
|
COPY requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install -r requirements.txt
|
|
|
|
# Copy the application code
|
|
COPY main.py .
|
|
|
|
# Expose the application port
|
|
EXPOSE 8000
|
|
|
|
# Run the application
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|