Sign inSign up

infrastructr/git-server

By infrastructr

•Updated over 6 years ago

Image
0

87

infrastructr/git-server repository overview

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

Tag summary

Content type

Image

Digest

Size

12.3 MB

Last updated

over 6 years ago

docker pull infrastructr/git-server