File tree Expand file tree Collapse file tree 2 files changed +32
-5
lines changed
Expand file tree Collapse file tree 2 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,6 @@ COPY requirements.txt /app/
2020# Install any needed packages specified in requirements.txt
2121RUN pip install --no-cache-dir -r requirements.txt
2222
23- # Create a requirements file if it doesn't exist
24- RUN touch requirements.txt && \
25- echo "requests" >> requirements.txt && \
26- pip install --no-cache-dir -r requirements.txt
27-
2823# Make sure the script is executable
2924RUN chmod +x /app/huntarr.py
3025
Original file line number Diff line number Diff line change 1+ # Use an official Python runtime as a parent image
2+ FROM python:3.9-slim
3+
4+ # Set environment variables to prevent Python from writing pyc files and buffering stdout/stderr
5+ ENV PYTHONDONTWRITEBYTECODE 1
6+ ENV PYTHONUNBUFFERED 1
7+
8+ # Install system dependencies
9+ RUN apt-get update && apt-get install -y \
10+ docker.io \
11+ && rm -rf /var/lib/apt/lists/*
12+
13+ # Set the working directory in the container
14+ WORKDIR /app
15+
16+ # Copy the current directory contents into the container at /app
17+ COPY huntarr.py /app/
18+ COPY requirements.txt /app/
19+
20+ # Install any needed packages specified in requirements.txt
21+ RUN pip install --no-cache-dir -r requirements.txt
22+
23+ # Create a requirements file if it doesn't exist
24+ RUN touch requirements.txt && \
25+ echo "requests" >> requirements.txt && \
26+ pip install --no-cache-dir -r requirements.txt
27+
28+ # Make sure the script is executable
29+ RUN chmod +x /app/huntarr.py
30+
31+ # Run the script when the container launches
32+ CMD ["python3", "/app/huntarr.py"]
You can’t perform that action at this time.
0 commit comments