A simple image to help mirroring a git local repository to a remote host.
494
Sources: https://git.simply-life.net/docker/git-mirror
To mirror a local repository to a server:
docker run -e GITMIRROR_DEPLOY_KEY=<deploy key contents> -v /path/to/git/repository:/git:ro haffmans/git-mirror git-mirror /git [email protected]:my/repository
Note the command 'git-mirror'; this is required.
This is set up to be used from GitLab (CE), to allow mirroring to external servers on push. This will feed commands as a script, making it impossible to pass the required parameters directly.
You can customize the pre-set known hosts using ssh-keyscan:
ssh-keyscan git.example.com >> ssh/known_hosts
This default version supports GitHub and GitLab.com services.
Content type
Image
Digest
Size
13.5 MB
Last updated
almost 8 years ago
docker pull haffmans/git-mirror