From 19faf38f47187ff753cdee06873da44fc2e3e7e1 Mon Sep 17 00:00:00 2001 From: MountainGod2 Date: Wed, 7 Aug 2024 18:14:11 -0600 Subject: [PATCH] fix: simplify Dockerfile logic --- Dockerfile | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index d83b6725..c89ab534 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,15 @@ # Use the official Python image from the Docker Hub FROM python:3.11-slim-buster -# Install Poetry -RUN pip install poetry==1.4.2 +# Install the program and its dependencies using pip +RUN pip install chaturbate-poller # Set working directory WORKDIR /app -# Copy only the dependency files first for better caching -COPY pyproject.toml poetry.lock ./ - -# Install dependencies without dev dependencies -RUN poetry install --only main - # Create a non-root user and switch to it RUN useradd -m myuser && chown -R myuser:myuser /app USER myuser -# Set the working directory -WORKDIR /app - -# Set environment variables -ENV PATH="/app/.venv/bin:$PATH" - -# Command to run the CLI program -ENTRYPOINT ["poetry", "run", "chaturbate_poller"] +# Run the program +ENTRYPOINT ["python" "-m" "chaturbate_poller"]