Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
filters: |
mergerfs: 'mergerfs/**'
snapraid: 'snapraid/**'
snapraid-daemon: 'snapraid-daemon/**'

validate:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions snapraid-daemon/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# renovate: datasource=github-releases depName=amadvance/snapraid-daemon
VERSION=1.0
34 changes: 34 additions & 0 deletions snapraid-daemon/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# syntax=docker/dockerfile:1
# hadolint global ignore=DL3007,DL3018
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0 AS xx

# =========================================================
FROM --platform=$BUILDPLATFORM alpine:3.23.3 AS build
SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]
RUN apk add --no-cache clang make
COPY --from=xx / /
WORKDIR /src
ARG VERSION
RUN \
url="https://github.com/amadvance/snapraid-daemon/releases/download/v${VERSION}/snapraid-daemon-${VERSION}.tar.gz"; \
wget -qO- "$url" | tar xz --strip-components=1
ARG TARGETPLATFORM
RUN \
xx-apk add xx-c-essentials; \
CC=xx-clang LDFLAGS=-static ./configure --host "$(xx-clang --print-target-triple)"; \
make; \
xx-verify --static snapraidd; \
./snapraidd --version

# =========================================================
FROM scratch AS image
COPY --from=build /src/snapraidd /usr/bin/
ARG VERSION
LABEL org.opencontainers.image.title="snapraid-daemon"
LABEL org.opencontainers.image.description="snapraid-daemon is a backup program for disk arrays. It stores parity information of your data and it recovers from up to six disk failures."
LABEL org.opencontainers.image.url="https://www.snapraid.it"
LABEL org.opencontainers.image.version="${VERSION}"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.source="https://github.com/sprat/docker-images"
LABEL org.opencontainers.image.authors="Sylvain Prat <sylvain.prat@achird.net>"
ENTRYPOINT ["/usr/bin/snapraidd"]
24 changes: 24 additions & 0 deletions snapraid-daemon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# snapraid-daemon

This is an unofficial Docker image of [snapraid daemon](https://www.snapraid.it/), a backup program for disk arrays.

snapraid daemon is made by Andrea Mazzoleni and licensed under GPL-3.0. See the snapraid daemon site for more details.

This image contains a single static binary of snapraidd, nothing more.

To use this image:
- mount your configuration file in `/etc/snapraidd.conf`
- mount the disk devices and mountpoints into the container

Here is a example `compose.yaml` file:
```yaml
services:
snapraid-daemon:
image: sprat/snapraid-daemon:latest
ports:
- 7627:7627
volumes:
- ./snapraidd.conf:/etc/snapraidd.conf:ro # the snapraid daemon configuration
- /dev:/dev # the disk devices are here
- /media:/media # the mountpoints are inside this directory
```
25 changes: 25 additions & 0 deletions snapraid-daemon/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
ui:
image: sprat/snapraid-daemon:latest
ports:
- 7627:7627
build:
args:
VERSION: ${VERSION}
tags:
- sprat/snapraid-daemon:${VERSION}
- sprat/snapraid-daemon:latest
x-bake:
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7

test:
image: busybox:latest
command:
- wget
- -q
- http://ui:7627/
depends_on:
- ui
Loading