Update Dockerfile
Browse files1234567891011121314151 unmodified line1718192021222319242526272829253031322833343035363733343839403641424344# Use Alpine-based Python image for a smaller image size FROM python:3.11-alpine
# Metadata as described in your project LABEL name="Comet" \ description="Stremio's fastest torrent/debrid search add-on." \ url="https://github.com/g0ldyy/comet"
# Set the working directory inside the container WORKDIR /app
# Optional: Argument for database path if needed in your app ARG DATABASE_PATH
# Environment variables for Python and Poetry 1 unmodified line PYTHONDONTWRITEBYTECODE=1 \ POETRY_NO_INTERACTION=1 \ POETRY_HOME="/usr/local" \ PATH="$PATH:$POETRY_HOME/bin" \ FORCE_COLOR=1 \ TERM=xterm-256color
# Install necessary build dependencies # Install necessary build dependencies RUN apk add --no-cache \ gcc \ musl-dev \ libffi-dev \ make \ python3-dev # Added to help with building some dependencies python3-dev # Required for building some Python packages
# Install Poetry RUN pip install poetry RUN pip install --no-cache-dir poetry
# Copy only the Poetry files first for dependency installation # Copy only the Poetry files and install dependencies first COPY pyproject.toml poetry.lock ./
# Install dependencies using Poetry RUN poetry install --no-cache --without dev # Install dependencies without development packages RUN poetry install --no-root --no-dev
# Now copy the rest of the application code # Copy the rest of your application code to the image COPY . .
# Entrypoint to run the application Dockerfile+12-7