rsyncd: secrets file is set up by entrypoint script
parent
52991f937a
commit
ddb0c180d9
|
@ -1,5 +1,9 @@
|
|||
FROM alpine:3.16
|
||||
|
||||
RUN apk add --no-cache rsync
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
CMD ["/usr/bin/rsync", "--daemon", "--no-detach", "--config", "/etc/rsyncd.conf"]
|
||||
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"]
|
||||
|
|
|
@ -5,13 +5,13 @@ PLATFORMS=linux/amd64,linux/arm64
|
|||
|
||||
.PHONY: build push buildx
|
||||
|
||||
build: Dockerfile
|
||||
build: Dockerfile entrypoint.sh
|
||||
docker build -t $(IMG) .
|
||||
|
||||
push: build
|
||||
docker image push $(IMG)
|
||||
|
||||
buildx: Dockerfile
|
||||
buildx: Dockerfile entrypoint.sh
|
||||
docker buildx build \
|
||||
--platform $(PLATFORMS) \
|
||||
--tag $(IMG) \
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -n "$SECRETS" ]; then
|
||||
echo "$SECRETS" > /etc/rsyncd.secrets
|
||||
chmod 600 /etc/rsyncd.secrets
|
||||
fi
|
||||
|
||||
exec "$@"
|
Loading…
Reference in New Issue