-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
giovanni.buroni
committed
Dec 11, 2024
1 parent
5b6bc0e
commit 18a75f2
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.9-slim | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Install system dependencies required for building Python C extensions | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
build-essential \ | ||
gcc \ | ||
g++ \ | ||
libffi-dev \ | ||
libpq-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the requirements.txt file into the container at /app | ||
COPY requirements.txt /app/ | ||
|
||
# Install the Python dependencies from requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the rest of the project files into the container at /app | ||
COPY . /app | ||
|
||
# Specify the command to run the application | ||
CMD ["python", "main.py"] |