Mazenvip12 commited on
Commit
f7c73ef
·
verified ·
1 Parent(s): 37e51cb

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM docker.io/library/python:3.10@sha256:e2c7fb05741c735679b26eda7dd34575151079f8c615875fbefe401972b14d85
2
+
3
+ WORKDIR /home/user/app
4
+
5
+ # تثبيت المتطلبات الأساسية
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ git-lfs \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ cmake \
13
+ rsync \
14
+ libgl1-mesa-glx \
15
+ curl \
16
+ && rm -rf /var/lib/apt/lists/* \
17
+ && git lfs install
18
+
19
+ # تثبيت Node.js (إذا كان مطلوبًا)
20
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
21
+ && apt-get install -y nodejs \
22
+ && rm -rf /var/lib/apt/lists/*
23
+
24
+ # إنشاء مستخدم غير root
25
+ RUN useradd -m -u 1000 user && chown -R user:user /home/user/app
26
+ USER user
27
+
28
+ # نسخ الملفات المطلوبة
29
+ COPY --chown=user:user requirements.txt ./
30
+
31
+ # تثبيت حزم Python
32
+ RUN pip install --no-cache-dir --upgrade pip \
33
+ && pip install --no-cache-dir -r requirements.txt
34
+
35
+ # نسخ باقي الملفات
36
+ COPY --chown=user:user . .
37
+
38
+ # تشغيل التطبيق
39
+ CMD ["python", "app.py"]