From 67c2b0f29d52cf9738cdfd99420a05d7f53b1735 Mon Sep 17 00:00:00 2001 From: Mohamad anas fattoum Date: Wed, 6 Dec 2023 22:44:08 +0100 Subject: [PATCH] add Dockerfile --- posts/Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 posts/Dockerfile diff --git a/posts/Dockerfile b/posts/Dockerfile new file mode 100644 index 0000000..ffd5e23 --- /dev/null +++ b/posts/Dockerfile @@ -0,0 +1,22 @@ +# start docker with kernal slim + install python 3.11 +FROM python:3.11.6-slim-bullseye + +# option linux : python +ENV PYTHONUNBUFFERED = 1 + +# update linux #لمساعدة تنزيل المكتباب المبنية بالبايث gcc +RUN apt-get update && apt-get -y install gcc libpq-dev + +# create folder ----> project +WORKDIR /app + +# pip freeze > requirements.txt + +# copy requirements.txt file +COPY requirements.txt /app/requirements.txt + +# install all libraries # -r read +RUN pip install -r /app/requirements.txt + +# copy all project files +COPY . /app/ \ No newline at end of file