Sign inSign up

mohasaburr/gitdock

By mohasaburr

Updated almost 4 years ago

A simple docker container for your private git repository

Image
0

257

mohasaburr/gitdock repository overview

GitHub: https://github.com/MohaSabur/gitdock
Use instruction


You can use this image where you want have a private repository, simple backup and restore instructions


For run image you need volume for further backup or modification

docker volume create gitdock

Run image

docker run --name gitdock -d -v gitdock:/home/git -p 1287:22 mohasaburr/gitdock

Now you must put your public ssh keys

sudo nano /var/lib/docker/volumes/gitdock/_data/share/authorized_keys

Then you must run this command for register your keys

docker exec gitdock authkeys

Now you can directly ssh to your container

ssh git@ip -p 1287

But you can also create repository without ssh

docker exec -i gitdock createrepo

you must type name of your repository that you want create

Then you can clone that repository on your local machine

git clone ssh://git@ip:1287/~/name_of_repository_you_created

Then you simply can Push , Pull , Commit ecc

For backup you must archive volume location

sudo tar -czf ./repoback.tar.gz /var/lib/docker/volumes/gitdock/_data/*

You can use this backup on another machine with this container or without this container , without any conflict

Tag summary

Content type

Image

Digest

sha256:b7ca0281c

Size

113.1 MB

Last updated

almost 4 years ago

docker pull mohasaburr/gitdock