commit 840d2a0e00d0ee545e0978221e18902352a24401 parent feea96d1a4945a873e09d25c5457b2e5003c669a Author: Akuario <jkarlos.b@gmail.com> Date: Thu, 28 Jul 2016 02:56:12 +0200 Modified Readme Diffstat:
M | README.md | | | 23 | +++++++++++++++++------ |
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md @@ -3,15 +3,11 @@ A lightweight Git Server Docker image built with Alpine Linux. Available on [Git ### Basic Usage -How to make the image: - - $ docker build -t git-server-docker . - How to run the container in port 2222 with two volumes, keys volume for public keys and repos volume for git repositories: $ docker run -d -p 2222:22 -v /home/jkarlos/git-server/keys:/git-server/keys -v /home/jkarlos/git-server/repos:/git-server/repos jkarlos/git-server-docker -How check that container works: +How check that container works (you must to have a key): $ ssh git@<ip-docker-server> -p 2222 -v @@ -19,10 +15,25 @@ How clone a repository: $ git clone ssh://git@<ip-docker-server>:2222/git-server/repos/myrepo.git +### Arguments + + * **Expose ports**: 22 + * **Volumes**: + * */git-server/keys*: Volume to store the users public keys + * */git-server/repos*: Volume to store the repositories + +### SSH Keys + How generate a pair keys in client machine: $ ssh-keygen -t rsa -How upload quickly a public key: +How upload quickly a public key to host volume: $ scp ~/.ssh/id_rsa.pub user@host:/home/jkarlos/git-server/keys + +### Build Image + +How to make the image: + + $ docker build -t git-server-docker .