Skip to content

Commit c4d9614

Browse files
committed
update
1 parent 84873be commit c4d9614

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ COPY requirements.txt /app/
2020
# Install any needed packages specified in requirements.txt
2121
RUN 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
2924
RUN chmod +x /app/huntarr.py
3025

Dockerfile.backup

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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"]

0 commit comments

Comments
 (0)