mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-28 09:41:20 +00:00
update rsyncd
This commit is contained in:
parent
b055499aba
commit
415143d7a8
@ -5,12 +5,13 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@easypi.info>
|
MAINTAINER kev <noreply@easypi.info>
|
||||||
|
|
||||||
RUN apk add -U rsync \
|
RUN set -xe \
|
||||||
|
&& apk add -U rsync \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY rsyncd.* /etc/
|
COPY rsyncd.* /etc/
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /share
|
||||||
EXPOSE 873
|
EXPOSE 873
|
||||||
|
|
||||||
CMD rsync --daemon --no-detach --log-file /dev/stdout
|
CMD rsync --daemon --no-detach --log-file /dev/stdout
|
||||||
|
54
rsyncd/README.md
Normal file
54
rsyncd/README.md
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
rsyncd
|
||||||
|
======
|
||||||
|
|
||||||
|
![](https://badge.imagelayers.io/vimagick/rsyncd:latest.svg)
|
||||||
|
|
||||||
|
[rsync][1] is an open source utility that provides fast incremental file transfer.
|
||||||
|
[rsyncd][2] is rsync in daemon mode.
|
||||||
|
|
||||||
|
## docker-compose.yml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
rsyncd:
|
||||||
|
image: vimagick/rsyncd
|
||||||
|
ports:
|
||||||
|
- "873:873"
|
||||||
|
volumes:
|
||||||
|
# - ./rsyncd.conf:/etc/rsyncd.conf
|
||||||
|
- ./share:/share
|
||||||
|
restart: always
|
||||||
|
```
|
||||||
|
|
||||||
|
> You can mount `rsyncd.conf` to override the default one.
|
||||||
|
|
||||||
|
## rsyncd.conf (default)
|
||||||
|
|
||||||
|
```
|
||||||
|
[global]
|
||||||
|
charset = utf-8
|
||||||
|
max connections = 8
|
||||||
|
reverse lookup = no
|
||||||
|
|
||||||
|
[share]
|
||||||
|
path = /share
|
||||||
|
read only = yes
|
||||||
|
#hosts allow = 192.168.0.0/16
|
||||||
|
#auth users = *
|
||||||
|
#secrets file = /etc/rsyncd.secrets
|
||||||
|
#strict modes = false
|
||||||
|
```
|
||||||
|
|
||||||
|
## server
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## client
|
||||||
|
|
||||||
|
```
|
||||||
|
rsync -avz easypi.info::share /path/to/folder
|
||||||
|
```
|
||||||
|
|
||||||
|
[1]: https://rsync.samba.org
|
||||||
|
[2]: https://download.samba.org/pub/rsync/rsyncd.conf.html
|
@ -3,5 +3,5 @@ rsyncd:
|
|||||||
ports:
|
ports:
|
||||||
- "873:873"
|
- "873:873"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./share:/share
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
[data]
|
[global]
|
||||||
path = /data
|
charset = utf-8
|
||||||
auth users = *
|
max connections = 8
|
||||||
secrets file = /etc/rsyncd.secrets
|
reverse lookup = no
|
||||||
strict modes = false
|
|
||||||
|
[share]
|
||||||
|
path = /share
|
||||||
|
read only = yes
|
||||||
|
#hosts allow = 192.168.0.0/16
|
||||||
|
#auth users = *
|
||||||
|
#secrets file = /etc/rsyncd.secrets
|
||||||
|
#strict modes = false
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
root:root
|
|
||||||
admin:admin
|
|
Loading…
Reference in New Issue
Block a user