Compare commits

...

2 Commits

Author SHA1 Message Date
Ricard Illa ddb0c180d9
rsyncd: secrets file is set up by entrypoint script 2022-09-16 12:12:02 +02:00
Ricard Illa 52991f937a
rsyncd image 2022-09-16 11:00:50 +02:00
3 changed files with 36 additions and 0 deletions

9
rsyncd/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM alpine:3.16
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
apk add --no-cache rsync
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/rsync", "--daemon", "--no-detach", "--config", "/etc/rsyncd.conf", "--verbose"]

19
rsyncd/Makefile Normal file
View File

@ -0,0 +1,19 @@
IMG_NAME=rsyncd
REGISTRY=registry.monotremata.xyz
IMG=$(REGISTRY)/$(IMG_NAME)
PLATFORMS=linux/amd64,linux/arm64
.PHONY: build push buildx
build: Dockerfile entrypoint.sh
docker build -t $(IMG) .
push: build
docker image push $(IMG)
buildx: Dockerfile entrypoint.sh
docker buildx build \
--platform $(PLATFORMS) \
--tag $(IMG) \
--push \
.

8
rsyncd/entrypoint.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ -n "$SECRETS" ]; then
echo "$SECRETS" > /etc/rsyncd.secrets
chmod 600 /etc/rsyncd.secrets
fi
exec "$@"