forked from Panacota96/master-Project-Phishing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 637 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (18 loc) · 637 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.12-slim
# Prevent Python from writing .pyc files and enable unbuffered output
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# Install dependencies first (layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY config.py run.py lambda_handler.py seed_dynamodb.py setup_local_db.py ./
COPY app/ app/
COPY examples/ examples/
# Create non-root user for the app container
RUN useradd --create-home flask \
&& chown -R flask:flask /app
USER flask
EXPOSE 8000
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "2", "run:app"]