A simple docker container to synchonize 2 git repos.
The service fetches from one repository indicated by the environment-variable $ORIGIN and puches to a repository $REMOTE. To be able to handle ssh-connections it needs read-only access to an id_rsa-file.
docker run --rm -d \
-v $HOME/.ssh/id_rsa:/ssh-template/id_rsa:ro \
-e ORIGIN=git@github.com:nemoinho/repo-syncer.git \
-e REMOTE=git@github.com:nemoinho/another-repo.git \
nemoinho/repo-syncer
version: '3'
services:
repo-syncer:
image: nemoinho/repo-syncer
volumes:
- id_rsa.key:/ssh-template/id_rsa:ro
environment:
ORIGIN: git@github.com:nemoinho/repo-syncer.git
REMOTE: git@github.com:nemoinho/another-repo.git
- Only SSH-based connections are supported right now
- The provided key-file can't have a passphrase at the moment
- Both repositories has to be accesible via one ssh-key