Ctrl K
ComunidadGuías…

Dockerfile

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Use Python 3.11 as base image
FROM python:3.11-slim

# Set timezone
ENV TZ="Europe/Prague"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    gcc \
    libssl-dev \
    tzdata \
    && rm -rf /var/lib/apt/lists/*

# Copy the dependency manifests first to leverage Docker cache. The image is
# installed from the hash-pinned lockfile, never from the loose requirements.txt
# floors, so every build resolves to exactly what was last tested. Regenerate
# with scripts/deps-lock.sh after editing requirements.txt.
COPY requirements.txt requirements.lock ./

# Install Python dependencies (fails closed on any hash or version mismatch)
RUN pip install --no-cache-dir --require-hashes -r requirements.lock

# Copy application code
COPY . .

# Create data directory, set permissions, and initialize the database
RUN mkdir -p /app/data && chmod 777 /app/data && python init_mindbaboon_db.py

# Expose port
EXPOSE 5000

# Command to run the application
#CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:5000", "mindbaboon:app", "--log-level", "debug", "--access-logfile", "-", "--error-logfile", "-"]
#CMD ["python", "mindbaboon.py"]
# Link this GHCR package to its source repo (auto-connects on push)
LABEL org.opencontainers.image.source=https://github.com/petronijus/Mindbaboon