Skip to content

infrastructr/docker-git-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Cloud Build Status Docker Pulls GitHub tag (latest by date)

Git Server

Docker based Git SSH server for testing purposes.

Usage

  1. Run Git server.

     docker-compose up -d
    
  2. Add local public SSH key to the server's git user.

     docker-compose exec git-server /bin/ash -c \
         "echo '<ssh public key>' >> /home/git/.ssh/authorized_keys"
    
  3. Create Git repository foo.

     docker-compose exec git-server /bin/ash -c "\
         mkdir -p /git/foo \
         && git init --bare /git/foo \
         && chown -R git:git /git \
         "
    
  4. Clone Git repository foo.

     git clone ssh://git@localhost:2222/git/foo \
         && cd foo
    
  5. Commit and push to the Git repository foo.

     echo "baz" > bar \
         && git add bar \
         && git commit -m "baz into bar" \
         && git push origin HEAD 
    

Development

Run locally built image

docker-compose up

Rebuild image

docker-compose build

Maintainers

License

See the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published