adding an rsync image
This commit is contained in:
parent
fb9e59e925
commit
b3af7d26f6
4 changed files with 71 additions and 0 deletions
5
rsyncd/Dockerfile
Normal file
5
rsyncd/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM alpine
|
||||
RUN apk add rsync && mkdir -p /data && touch /etc/rsyncd.conf
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 873
|
||||
CMD ["/usr/bin/rsync","--daemon","--no-detach","--config", "/etc/rsyncd.conf"]
|
21
rsyncd/README.md
Normal file
21
rsyncd/README.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# rsyncd container
|
||||
|
||||
## build it
|
||||
|
||||
```shell
|
||||
podman build -t rsyncd .
|
||||
```
|
||||
|
||||
## run it
|
||||
|
||||
```shell
|
||||
cp podman-rsyncd.service /etc/systemd/system/
|
||||
mkdir -p /etc/podman.d
|
||||
cat > /etc/podman.d <<EOF
|
||||
IMAGE_NAME=rsyncd
|
||||
PODMAN_RUN_ARGS=" -it --rm -v /mnt/data/mydata-rsyncd.conf:/etc/rsyncd.conf:ro -v /mnt/data/mydata/:/data:ro -p 873:873 "
|
||||
EOF
|
||||
systemctl enable --now podman-rsyncd.service
|
||||
```
|
||||
|
||||
|
12
rsyncd/podman-rsyncd.service
Normal file
12
rsyncd/podman-rsyncd.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=fast remote file copy program daemon
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/podman.d/rsyncd.conf
|
||||
ExecStart=/usr/bin/podman run $PODMAN_RUN_ARGS rsyncd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
33
rsyncd/rsyncd.conf
Normal file
33
rsyncd/rsyncd.conf
Normal file
|
@ -0,0 +1,33 @@
|
|||
# /etc/rsyncd: configuration file for rsync daemon mode
|
||||
|
||||
# See rsyncd.conf man page for more options.
|
||||
|
||||
# configuration example:
|
||||
|
||||
# uid = nobody
|
||||
# gid = nobody
|
||||
# use chroot = yes
|
||||
# max connections = 4
|
||||
# pid file = /var/run/rsyncd.pid
|
||||
# exclude = lost+found/
|
||||
# transfer logging = yes
|
||||
# timeout = 900
|
||||
# ignore nonreadable = yes
|
||||
# dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
|
||||
|
||||
# [ftp]
|
||||
# path = /home/ftp
|
||||
# comment = ftp export area
|
||||
|
||||
uid = nobody
|
||||
gid = nobody
|
||||
use chroot = yes
|
||||
#log file = /var/log/rsync.log
|
||||
dont compress = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2
|
||||
transfer logging = yes
|
||||
|
||||
[data]
|
||||
path = /data/
|
||||
comment = my data
|
||||
|
||||
|
Loading…
Reference in a new issue