A basic docker container that accepts file upload using rsync
This repository has been archived on 2025年01月22日 . You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
|
Jakob Meier
ba8f53e671
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
|---|---|---|
| examples | Added static-file-server example | |
| .gitignore | Added README | |
| .woodpecker.yml | Added woodpecker-ci to autobuild images | |
| docker-compose.yml | Updated container image name & link | |
| docker-entrypoint.sh | Added ability to rename bucket/module | |
| Dockerfile | Added ability to rename bucket/module | |
| LICENSE | Added MIT License | |
| README.org | Updated container image name & link | |
docker-rsyncd
A basic docker container that accepts file upload using rsync.
Usage
You can run the container as you would any other docker container:
doas docker run -v ./demo:/storage -p 873:873 -it rsyncd
By default this will accept connections as the user deploy,
with the password deploy as well.
But the container exposes following environment variables:
RSYNC_USER, the username used by rsync for authenticationRSYNC_PASS, the password used by rsync for authenticationHOST_USER, used to set file permission of uploaded files. (Should match the UID of the host user)RSYNC_CONFIG, can be used to overwrite the path to thersyncd.conffile. (You probably do not need to change this, but if you want to use a custom config, you'll have to change this. Keep in mind that changing this also means that you have to manage authentication yourself)BUCKET_NAME, can be used to change the rsync module name. Defaults tostorage
If you prefer using docker compose,
you might want to check out the docker-compose example,
where we combine rsyncd with nginx
to build a static file deployment server.
Building
In case you are not happy with the prebuild images, you can manually build the container:
The easiest way is marking the Dockerfile as executable,
and then running it
chmod +x Dockerfile
./Dockerfile
But if you do not feel confident with marking Dockerfiles as executable,
you can also use docker build directly
docker build . -t docker-rsyncd