Skip to content

Docker container that mirrors a local directory to a git repo

Notifications You must be signed in to change notification settings

monasca/git-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Docker container that mirrors a local directory to a git repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published