vitorcalvi's picture
Add application file
8842208
raw
history blame
606 Bytes
# Start from a standard Python base image
FROM python:3.9
# Set the working directory inside the container
WORKDIR /code
# Copy the requirements file into the container
COPY ./requirements.txt /code/requirements.txt
# Install the Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy your application code into the container
COPY ./app.py /code/app.py
# Expose the port the app runs on
EXPOSE 8000
# The command to run your FastAPI app using uvicorn
# This will be run when the container starts
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]