your-api-name / Dockerfile
Subham629's picture
Update Dockerfile
1ae2d4b verified
raw
history blame contribute delete
358 Bytes
# Use Python 3.9 as the base image
FROM python:3.9
# Set working directory
WORKDIR /app
# Copy all files into the container
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose Flask API port
EXPOSE 8000
# Run Gunicorn and explicitly specify the module (api.py) and app instance
CMD["python","api.py"]