Technologic101 commited on
Commit
900e013
·
1 Parent(s): 78927d3

build: add dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.11 slim image
2
+ FROM python:3.11-slim
3
+
4
+
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ # Install system dependencies
11
+ RUN apt-get update && apt-get install -y \
12
+ curl \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Install Poetry
16
+ RUN curl -sSL https://install.python-poetry.org | python -
17
+
18
+ WORKDIR /app
19
+
20
+ # Copy pyproject.toml and poetry.lock files
21
+ COPY pyproject.toml poetry.lock* ./
22
+
23
+ # Install dependencies using Poetry
24
+ RUN poetry config virtualenvs.create false \
25
+ && poetry install --no-dev --no-interaction --no-ansi
26
+
27
+ COPY --chown=user . /app
28
+ CMD ["python", "src/app.py"]