Giter Club home page Giter Club logo

docker-volume-container-rsync's Introduction

docker-volume-container-rsync

Docker Image CI

docker-volume-container-rsync is to provide RSYNC access to a mounted volume. You can synchronize your local file over RSYNC into a container volume very fast.

News (as of Dec 2, 2022)

I've moved to GHCR (Github Container Registery) and a new repository provides multi-arch images for Linux/amd64 and Linux/arm64.

I'll not remove old images but please migrate to the new location.

Usage

First, you can launch a volume container exposing a volume with rsync.

CID=$(docker run -d -p 10873:873 ghcr.io/nabeken/docker-volume-container-rsync:latest)

You can connect to rsync server inside a container like this:

rsync rsync://<docker>:10873/
volume          docker volume

To sync:

rsync -avP /path/to/dir rsync://<docker>:10873/volume/

Next, you can launch a container connected with the volume under /docker.

docker run -it --volumes-from $CID ubuntu /bin/sh

Advanced

In default, rsync server accepts a connection only from 192.168.0.0/16 and 172.16.0.0/12 for security reasons. You can override via an environment variable like this:

docker run -d -p 10873:873 -e ALLOW='10.0.0.0/8 x.x.x.x/y' ghcr.io/nabeken/docker-volume-container-rsync:latest

Using with different directory

Let's say you want to use /data rather than /docker.

First, you must launch a volume container exposing /data directory:

CID=$(docker run --volume /data -d -e VOLUME=/data -p 10873:873 ghcr.io/nabeken/docker-volume-container-rsync:latest)

Finally, you can mount the volumes from the container:

docker run -it --volumes-from $CID ubuntu /bin/sh

docker-volume-container-rsync's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-volume-container-rsync's Issues

How to use

Next, you can launch a container connected with the volume under /docker.

What do you mean when you say with the volume ?

If I want to have a data container with /var/lib/registry how do I use this container ?

Rsync fails without permissions to write to /

I had been getting this error:

@ERROR: chroot failed
rsync error: error starting client-server protocol (code 5) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-47/rsync/main.c(1398) [sender=2.6.9]

I was able to work around this by setting working_dir to the volume directory in my docker-compose file. I'm sorry I can't provide a simple pull request. I tried doing cd "$VOLUME" in the run script right before exec, but for reasons I don't understand, that didn't fix the problem.

Dependency Dashboard self-hosted

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

docker-compose
compose-test.yaml
  • ghcr.io/nabeken/docker-volume-container-rsync action-local-test
dockerfile
Dockerfile
  • debian 12@sha256:b37bc259c67238d814516548c17ad912f26c3eed48dd9bb54893eafec8739c89
github-actions
.github/workflows/docker-image.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • docker/metadata-action v5@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
  • docker/setup-qemu-action v3@68827325e0b33c7199eb31dd4e31fbe9023e06e3
  • docker/setup-buildx-action v3@d70bba72b1f3fd22344832f00baa16ece964efeb
  • docker/build-push-action v5@2cdde995de11925a030ce8070c3d77a52ffcf1c0
  • docker/login-action v3@e92390c5fb421da1463c202d546fed0ec5c39f20
  • docker/build-push-action v5@2cdde995de11925a030ce8070c3d77a52ffcf1c0
.github/workflows/renovate_config_validator.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • suzuki-shunsuke/github-action-renovate-config-validator v1.0.1@b54483862375f51910a60c4f498e927d4f3df466

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.