From bbae7c2cd52ed6c446c3dddd45156ebe3c9c2bb6 Mon Sep 17 00:00:00 2001 From: Mohammad Yousef <104079633+MoeYousef1@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:00:08 +0300 Subject: [PATCH] Create dockerfile --- dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..e0a0fb3 --- /dev/null +++ b/dockerfile @@ -0,0 +1,20 @@ +# Use a specific version of the Python base image to ensure consistency across builds +FROM python:3.9-slim + +# Set the working directory in the Docker container +WORKDIR /app + +# Copy only the requirements file to the working directory to leverage Docker cache +COPY requirements.txt ./ + +# Install any required packages specified in requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the rest of the application code to the container +COPY . . + +# Expose port 6000 to allow communication to/from the server +EXPOSE 6000 + +# Command to run the application when the container starts +CMD ["python", "app.py"]