Ajouter Dockerfile
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Installer les dépendances système nécessaires pour Docker et le projet
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Installer Docker CLI
|
||||
RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
|
||||
sh get-docker.sh && \
|
||||
rm get-docker.sh
|
||||
|
||||
# Cloner le projet CodeGenerator
|
||||
RUN git clone https://github.com/kagnlp/CodeGenerator.git .
|
||||
|
||||
# Installer les dépendances Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Exposer le port de l'application
|
||||
EXPOSE 3000
|
||||
|
||||
# Démarrer l'application
|
||||
CMD ["python", "app.py"]
|
||||
Reference in New Issue
Block a user