random-api / Dockerfile
Salahin's picture
Update Dockerfile
a839ec2
Raw History Blame Contribute Delete
502 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory
WORKDIR /code
# Copy the requirements file
COPY ./requirements.txt /code/requirements.txt
# Install the dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the application code
COPY . .
# Set the working directory to /code/app
WORKDIR /code/app
# Run the command to start the development server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]