-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 712 Bytes
/
Dockerfile
File metadata and controls
27 lines (18 loc) · 712 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
27
# Utiliza la imagen base de Python 3.9
FROM python:3.10.4-alpine3.15
ENV PYTHONUNBUFFERED 1
# Configura el directorio de trabajo
WORKDIR /app/
RUN apk update \
&& apk add --no-cache gcc musl-dev postgresql-dev python3-dev libffi-dev \
&& pip install --no-cache-dir --upgrade pip
# Copia el archivo requirements.txt al contenedor
COPY ./requirements.txt ./
# Instala las dependencias
RUN pip install --no-cache-dir -r requirements.txt
# Copia el código de la aplicación al contenedor
COPY ./ ./
# Otorga permisos de ejecución al archivo docker-entrypoint.sh
RUN chmod +x ./scripts-sh/docker-entrypoint.sh
# Ejecuta el comando para arrancar el servidor
CMD ["sh","./scripts-sh/docker-entrypoint.sh"]