Sign inSign up

timothyb89/git-sync

By timothyb89

•Updated over 9 years ago

Docker container that mirrors a local directory to a git repo

Image
0

233

timothyb89/git-sync repository overview

⁠git-sync

A small docker container that automatically mirrors a directory to an ephemeral git repository. Changes are synced to a git repository exposed via Gitweb⁠. Using modd⁠, the repository will be automatically committed and pushed to the git repository as you make them.

⁠Usage

From the directory you want to expose, run:

docker run -v $(pwd):/src -p 1234:80 timothyb89/git-sync:latest

Gitweb should then be available at http://localhost:1234/⁠ with your working directory mirrored to the sync.git project. The URLs shown in the project summary should be accessible to any other containers on your local network, including containers being built.

⁠Why?

Docker can't mount volumes during builds⁠, which is inconvenient if you want to, for example, build a container from uncommitted code in your working directory. However, Docker builds can access resources on the network.

This container makes your changes immediately available in the form of a git repository, allowing Dockerfiles that clone git repositories to consume your working directory with little to no modification. If you can specify a repository and branch using --build-arg⁠, this will allow you to build a container from your local tree with no changes needed.

Tag summary

Content type

Image

Digest

Size

36.9 MB

Last updated

over 9 years ago

docker pull timothyb89/git-sync