Refactor Dockerfile comments for clarity and update ffmpeg installation to ffmpeg-free
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
# Usar imagen base UBI9 de Python de Red Hat
|
||||||
FROM registry.access.redhat.com/ubi9/python-39:latest
|
FROM registry.access.redhat.com/ubi9/python-39:latest
|
||||||
|
|
||||||
# Usuario root para instalar paquetes
|
# Usuario root para instalar paquetes
|
||||||
@@ -7,10 +8,11 @@ USER 0
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Instalar EPEL para RHEL 9.
|
# Instalar EPEL para RHEL 9.
|
||||||
# Luego, instalar las herramientas de compilación y ffmpeg.
|
# Luego, instalar las herramientas de compilación y ffmpeg-free.
|
||||||
# El repositorio ubi-9-codeready-builder-rpms ya está habilitado por defecto en la imagen base UBI9.
|
# El repositorio ubi-9-codeready-builder-rpms ya está habilitado por defecto.
|
||||||
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
|
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
|
||||||
dnf install -y gcc-c++ make ffmpeg && \
|
dnf makecache && \
|
||||||
|
dnf install -y gcc-c++ make ffmpeg-free && \
|
||||||
dnf clean all && \
|
dnf clean all && \
|
||||||
rm -rf /var/cache/dnf
|
rm -rf /var/cache/dnf
|
||||||
|
|
||||||
@@ -18,19 +20,18 @@ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.n
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|
||||||
# Instalar dependencias de Python
|
# Instalar dependencias de Python
|
||||||
# Aumentar el timeout por si alguna descarga de pip es lenta
|
|
||||||
RUN pip install --default-timeout=300 --no-cache-dir -r requirements.txt
|
RUN pip install --default-timeout=300 --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# Copiar código de la aplicación
|
# Copiar código de la aplicación
|
||||||
COPY app.py .
|
COPY app.py .
|
||||||
|
|
||||||
# Crear directorios si van a ser usados internamente ANTES de montar volúmenes,
|
# Crear directorios y establecer permisos
|
||||||
# y establecer permisos para OpenShift (GID 0).
|
|
||||||
RUN mkdir -p /app/shared /app/output && \
|
RUN mkdir -p /app/shared /app/output && \
|
||||||
chgrp -R 0 /app && \
|
chgrp -R 0 /app && \
|
||||||
chmod -R g+rwx /app
|
chmod -R g+rwx /app
|
||||||
|
|
||||||
# Volver al usuario predeterminado de la imagen UBI (no-root, UID 1001 para esta imagen)
|
# Volver al usuario predeterminado
|
||||||
USER 1001
|
USER 1001
|
||||||
|
|
||||||
|
# Comando para iniciar la aplicación
|
||||||
CMD ["python", "app.py"]
|
CMD ["python", "app.py"]
|
||||||
Reference in New Issue
Block a user