-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
38 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.13-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install SnapRAID
ARG SNAPRAID_VERSION=12.3
RUN wget -O snapraid.tar.gz "https://github.com/amadvance/snapraid/releases/download/v${SNAPRAID_VERSION}/snapraid-${SNAPRAID_VERSION}.tar.gz" \
&& tar -xzf snapraid.tar.gz \
&& cd snapraid-${SNAPRAID_VERSION} \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -rf snapraid-${SNAPRAID_VERSION} snapraid.tar.gz
# Install Python dependencies
RUN pip install requests
# Create app directory
WORKDIR /app
# Copy the automation script
COPY snapraidarr.py /app/snapraidarr.py
RUN chmod +x /app/snapraidarr.py
# Create directories for logs and config
RUN mkdir -p /app/logs /app/config /app/locks
# Create non-root user (optional, for better security)
RUN useradd -r -s /bin/false snapraid
# Set default command
ENTRYPOINT ["python3", "/app/snapraidarr.py"]
CMD ["-c", "/app/config/snapraidarr.conf"]