{"id":18482785,"url":"https://github.com/jenkins-infra/docker-rsyncd","last_synced_at":"2025-11-18T10:03:06.068Z","repository":{"id":40269419,"uuid":"327362895","full_name":"jenkins-infra/docker-rsyncd","owner":"jenkins-infra","description":"This repository define a rsync docker image","archived":false,"fork":false,"pushed_at":"2024-04-29T06:40:32.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-01T21:57:36.247Z","etag":null,"topics":["docker-image"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkins-infra.png","metadata":{"funding":{"community_bridge":"jenkins","custom":["https://jenkins.io/donate/#why-donate"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-06T16:07:38.000Z","updated_at":"2024-05-06T07:45:19.323Z","dependencies_parsed_at":"2024-01-01T07:27:36.510Z","dependency_job_id":"2e228ebc-d142-410e-8d58-56a264150bc1","html_url":"https://github.com/jenkins-infra/docker-rsyncd","commit_stats":null,"previous_names":[],"tags_count":160,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkins-infra%2Fdocker-rsyncd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkins-infra%2Fdocker-rsyncd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkins-infra%2Fdocker-rsyncd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkins-infra%2Fdocker-rsyncd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkins-infra","download_url":"https://codeload.github.com/jenkins-infra/docker-rsyncd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240241825,"owners_count":19770467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image"],"created_at":"2024-11-06T12:30:12.279Z","updated_at":"2025-11-18T10:03:06.021Z","avatar_url":"https://github.com/jenkins-infra.png","language":"Makefile","funding_links":["https://funding.communitybridge.org/projects/jenkins","https://jenkins.io/donate/#why-donate"],"categories":[],"sub_categories":[],"readme":"# README\n\nThis docker image provides a rsync service using either rsyncd (default) or sshd as backend daemon.\n\n## Using the image\n\nThis image is expected to run with a read only rootfs and unprivileged user.\nThe default user is `rsyncd` with an UID of `1000`.\n\n### rsyncd (default)\n\nThis mode used by default is convenient to provide anonymous rsync service (usually read-only) for mirrors.\n\nSimple usage:\n\n```shell\n# Start in background with defaults\ndocker run --detach --read-only -p 873:873 rsyncd\n# Check default dir (empty) with the rsync protocol and unauthenticated request\nrsync -av --port=873 localhost::root/ .tmp/\n```\n\nIt exposes the default Rsync port `873`, which can be changed using the `$RSYNCD_PORT` environment variable:\n\n```shell\n# Start in background with defaults\ndocker run --detach --read-only -p 1873:1873 -e RSYNCD_PORT=1873 rsyncd\n# Check default dir (empty) with the rsync protocol and unauthenticated request\nrsync -av --port=1873 localhost::root/ .tmp/\n```\n\nYou can provide \"Rsync configuration modules\" by mounting the `*.conf` files in `/home/rsyncd/etc/rsyncd.d/`:\n\n```shell\n# File ./jenkins.conf\n[jenkins]\npath = /home/rsyncd/data/jenkins\n\n# Start with the rsync module conf file bind mounted in read-only\ndocker run --detach --read-only -p 873:873 -v \"$(pwd)\"/jenkins.conf:/home/rsyncd/etc/rsyncd.d/jenkins.conf:ro -v jenkins-data:/home/rsyncd/data/jenkins:rw rsyncd\n# Check default dir (empty) with the rsync protocol and unauthenticated request\nrsync -av --port=873 localhost::root/ .tmp/\n# Check module 'jenkins'\nrsync -av --port=873 localhost::jenkins/ .tmp/jenkins/\n```\n\n### sshd\n\nThis mode should be preferred when using authenticated access (usually to write data).\n\nTo enable SSH instead of RsyncD, the environment variable `$RSYNCD_DAEMON` must be set to the value `sshd`.\n\nSSH is restricted to only `rsync *` commands for the `rsyncd` user:\nyou cannot login and execute commands, no port/X11 forwarding and no SCP/sftp are allowed\n(see the `ssh-rsync-wrapper.sh` script specified in the authorized keys).\n\nSSH Authentication is restricted to only 1 public key associated to the default user `rsyncd`.\nThis key is provided through the `$SSHD_PUBLIC_KEY` environment variable.\n\nSimple example:\n\n```shell\n# Start in background\ndocker run --detach --read-only -p 22:22 -e RSYNCD_DAEMON=sshd -e SSHD_PUBLIC_KEY=\"$(cat ~/.ssh/id_rsyncd.pub)\" rsyncd\n# Check default dir (empty) with the rsync protocol and unauthenticated request\nrsync -av --rsh=\"ssh -i $HOME/.ssh/id_rsyncd\" rsyncd@localhost:data/ .tmp/\n```\n\nIt exposes the default SSH port `22`, which can be changed using the `$SSHD_PORT` environment variable:\n\n```shell\n# Start in background and publishes the port 4022\ndocker run --detach --read-only -p 4022:4022 -e SSHD_PORT=4022 -e RSYNCD_DAEMON=sshd -e SSHD_PUBLIC_KEY=\"$(cat ~/.ssh/id_rsyncd.pub)\" rsyncd\n# Check default dir (empty) with the rsync protocol and unauthenticated request\nrsync -av --rsh=\"ssh -p 4022 -i $HOME/.ssh/id_rsyncd\" rsyncd@localhost:data/ .tmp/\n```\n\nSSH Daemon log level can be set through the `$SSHD_LOG_LEVEL` environment variable.\nDefault value is `INFO`, refer to \u003chttps://manpages.debian.org/testing/openssh-server/sshd_config.5.en.html#LogLevel\u003e for possible values.\n\nSafety Note: There are no concepts of \"Rsync\" module with SSH: any specified directory accessible by the `rsyncd` user can be read (...or written).\nAs such, it's recommended to always use a read-only rootfs and eventually restrict network access as additional security measures to the key based authentication.\n\nYou can provide a set of pre-existing host keys to be used (instead of generating a new set if absent) through the variable `HOST_KEYS_SRC_DIR`.\n\n## Build the image\n\n```shell\ndocker build --tag rsyncd ./\n```\n\n## Test the image\n\n- Unit testing the image with [`container-structure-test`](https://github.com/GoogleContainerTools/container-structure-test):\n\n```shell\ncontainer-structure-test test --image=rsyncd --config=cst.yml\n```\n\n- Manual acceptance testing of the the image with [`docker compose`](https://docs.docker.com/compose/):\n\n```shell\n$ cd ./tests\n$ docker compose up --build --detach\n$ sleep 2\n$ rsync -av rsync://localhost:1873/jenkins\n========================\n==== JENKINS MIRROR ====\n========================\n\n**Read Only**\n\nFeel free to reach out on https://www.jenkins.io/chat/#jenkins-infra/ with any question you may have\n\nreceiving file list ... done\ndrwxr-xr-x          96 2023/08/31 20:24:33 .\n-rw-r--r--          12 2023/08/31 20:24:37 sample.txt\n\nsent 16 bytes  received 111 bytes  254.00 bytes/sec\ntotal size is 12  speedup is 0.09\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkins-infra%2Fdocker-rsyncd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkins-infra%2Fdocker-rsyncd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkins-infra%2Fdocker-rsyncd/lists"}