Test / Dockerfile
rkihacker's picture
Update Dockerfile
03949fb verified
raw
history blame contribute delete
437 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Copy requirements.txt and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the FastAPI application
COPY main.py .
# Expose port 80 for HTTP
EXPOSE 80
# Run the FastAPI application with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "3000"]