testapp / Dockerfile
mujeebanwar's picture
Upload Dockerfile
c882c2c verified
Raw History Blame Contribute Delete
557 Bytes
# 1. Start from an official Python image
FROM python:3.9-slim
# 2. Set the working directory inside the container
WORKDIR /code
# 3. Copy the requirements file into the container
COPY requirements.txt .
# 4. Install the Python packages
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# 5. Copy the rest of your app's code into the container
COPY . .
# 6. Tell Docker what command to run when the container starts
# This is the SAME command that was in our Procfile!
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]