FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
python3-tk \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Default command
CMD ["python", "run.py"]
venv/ *.pyc __pycache__/ .env .env.local .env.* .dockerignore Dockerfile .local *.log *.sqlite3 *.db *.egg-info/ build/ dist/ *.egg-info/ *.pytest_cache/ .localenv venv/ *.venv/ *.venv/ .env/ local_settings.py .idea/ .vscode/ node_modules/ *.gz *.zip *.tar.gz *.tar *.log *.tmp *.bak *.tmp *.swp *.swo *.sqlite media/ models/ modules/__pycache__/ __pycache__/
Error summary:
- Exact error message and exit code
- process did not complete successfully: exit code: 1
- error: command 'g++' failed: No such file or directory
- Note: The wheel build for insightface failed, leading to overall install failure:
- “Failed building wheel for insightface”
- “failed-wheel-build-for-install”
- “╰─> insightface”
- Failing command/step
- [5/6] RUN python -m pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r requirements.txt
- Missing packages or files mentioned
- g++ (C++ compiler) is not present in the image, causing the wheel build to fail:
- "error: command 'g++' failed: No such file or directory"
- Version mismatch information
- No explicit version mismatch reported.
- The base image is python:3.11-slim-bullseye, and wheels referenced show CPython 3.11 (cp311) in many URLs, consistent with Python 3.11 usage. The failure is due to missing build toolchain (g++), not a Python version mismatch.FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
cmake \
pkg-config \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
zlib1g-dev \
libgl1-mesa-dev \
python3-tk \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Default command
CMD ["python", "run.py"]
Concerns: No non-root user configured; consider adding a non-root user for security., As a desktop app, run.py may launch a GUI; smoke tests that attempt to launch GUI would fail in headless CI; consider supporting headless mode or basic checks only. Smoke [PASS]: python3 --version Smoke [FAIL]: test -f /app/run.py && echo 'exists' || echo 'missing Output: sh: 1: Syntax error: Unterminated quoted string Smoke [PASS]: pip3 list | head -n 5
FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
cmake \
pkg-config \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
zlib1g-dev \
libgl1-mesa-dev \
python3-tk \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Create a non-root user and switch to it for running the app
RUN useradd -m -d /home/appuser -s /bin/bash appuser && \
chown -R appuser:appuser /app
USER appuser
# Default command
CMD ["python", "run.py"]
Concerns: Image may be bloated due to many build-time system dependencies (build-essential, gcc, cmake, ffmpeg, GUI libs). Consider trimming dependencies or using a multi-stage build to reduce image size., No HEALTHCHECK defined; adding a basic health check could help detect startup issues (e.g., ensuring run.py exists and Python can import required modules). Smoke [PASS]: test -f /app/run.py Smoke [PASS]: python -V Smoke [FAIL]: python -c 'import sys; print(sys.version) Output: sh: 1: Syntax error: Unterminated quoted string
FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
cmake \
pkg-config \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
zlib1g-dev \
libgl1-mesa-dev \
python3-tk \
git \
curl \
xvfb \
xauth \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Create a non-root user and switch to it for running the app
RUN useradd -m -d /home/appuser -s /bin/bash appuser && \
chown -R appuser:appuser /app
USER appuser
# Add headless wrapper script and make it executable
COPY run_headless.sh /app/run_headless.sh
RUN chmod +x /app/run_headless.sh
# Default command
CMD ["bash", "/app/run_headless.sh"]
No files found matching pattern.
#!/bin/sh # Start a virtual framebuffer to allow GUI apps to run headlessly if command -v xvfb-run >/dev/null 2>&1; then exec xvfb-run -a --server-args='-screen 0 1280x720x24' "$@" else echo 'Xvfb not found, attempting direct run.' exec "$@" fi
FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
cmake \
pkg-config \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
zlib1g-dev \
libgl1-mesa-dev \
python3-tk \
git \
curl \
xvfb \
xauth \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Create a non-root user and switch to it for running the app
RUN useradd -m -d /home/appuser -s /bin/bash appuser && \
chown -R appuser:appuser /app
USER appuser
# Add headless wrapper script and make it executable
COPY run_headless.sh /app/run_headless.sh
RUN chmod +x /app/run_headless.sh
# Default command
CMD ["bash", "/app/run_headless.sh"]
#!/bin/sh # Start a virtual framebuffer to allow GUI apps to run headlessly if command -v xvfb-run >/dev/null 2>&1; then exec xvfb-run -a --server-args='-screen 0 1280x720x24' "$@" else echo 'Xvfb not found, attempting direct run.' exec "$@" fi
- Exact error message and exit code - chmod: changing permissions of '/app/run_headless.sh': Operation not permitted (exit code: 1) - The failing command/step - [9/9] RUN chmod +x /app/run_headless.sh (Dockerfile:48) - Missing packages or files mentioned - None. The run_headless.sh file was copied earlier (COPY run_headless.sh /app/run_headless.sh) and the error occurs when attempting to chmod it. - Version mismatch info - No version mismatch errors reported. Base image shown: python:3.11-slim-bullseye; no mismatches flagged in the logs.
FROM python:3.11-slim-bullseye
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
gcc \
g++ \
make \
cmake \
pkg-config \
ffmpeg \
libsm6 \
libxext6 \
libxrender1 \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
zlib1g-dev \
libgl1-mesa-dev \
python3-tk \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Create a non-root user and switch to it for running the app
RUN useradd -m -d /home/appuser -s /bin/bash appuser && \
chown -R appuser:appuser /app
USER appuser
# Default command
CMD ["python", "run.py"]
Concerns: The app may require a GUI/display (Tkinter) and could fail in a headless container unless an X server / XVFB is configured., COPY requirements.txt and COPY . . rely on the build context; if these files are missing from the build context, the image build will fail., No .dockerignore shown; ensure large or sensitive files are excluded to keep build context small and secure. Smoke [PASS]: test -f /app/run.py Smoke [PASS]: python -V Smoke [PASS]: ls -la /app | head -n 20