-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.05 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -----------------------------
# Etapa base: imatge oficial de Python
# -----------------------------
FROM python:3.10-slim
# Evitem que Python escrigui fitxers .pyc i assegurem output immediat
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# -----------------------------
# Instal·lar dependències del sistema
# -----------------------------
RUN apt-get update && apt-get install -y \
build-essential \
default-mysql-client \
netcat-openbsd \
&& rm -rf /var/lib/apt/lists/*
# -----------------------------
# Crear directori de treball
# -----------------------------
WORKDIR /app
# -----------------------------
# Copiar fitxers de dependències primer (per cache)
# -----------------------------
COPY requirements.txt .
# Instal·lar dependències Python
RUN pip install --no-cache-dir -r requirements.txt
# -----------------------------
# Copiar la resta del projecte
# -----------------------------
COPY . .
# -----------------------------
# Executar script ETL per defecte
# -----------------------------
CMD ["python", "etl/etl_main.py"]