Created
May 7, 2024 13:01
-
-
Save lukas-h/3b944f4aa710271621dd295b7be79ebc to your computer and use it in GitHub Desktop.
Python PIP Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dockerfile | |
# Use a Python base image matching your project's Python version | |
FROM python:3.9 | |
# Set the working directory to /app | |
WORKDIR /app | |
# Copy the requirements file into the container | |
COPY requirements.txt . | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the Python code into the container | |
COPY . . | |
# Set the command to run when starting the container | |
CMD ["python", "app.py"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment