commit feea96d1a4945a873e09d25c5457b2e5003c669a
parent a972c35bfef9dc7f112677db393025b3aa542e22
Author: Akuario <jkarlos.b@gmail.com>
Date: Thu, 28 Jul 2016 02:35:04 +0200
Added comments
Diffstat:
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Dockerfile b/Dockerfile
@@ -22,6 +22,7 @@ RUN mkdir /git-server/keys \
&& echo git:12345 | chpasswd \
&& mkdir /home/git/.ssh
+# En sshd_config habilitamos acceso por key y deshabilitamos por password
COPY sshd_config /etc/ssh/sshd_config
COPY start.sh start.sh
diff --git a/README.md b/README.md
@@ -1,5 +1,5 @@
# git-server-docker
-A lightweight Git Server Docker image built with Alpine Linux. Available on [GitHub](https://github.com/jkarlosb/git-server-docker).
+A lightweight Git Server Docker image built with Alpine Linux. Available on [GitHub](https://github.com/jkarlosb/git-server-docker) and [Docker Hub](https://hub.docker.com/r/jkarlos/git-server-docker/)
### Basic Usage
@@ -7,7 +7,7 @@ How to make the image:
$ docker build -t git-server-docker .
-How to run the container in port 2222 with two volumes, keys volumen for public keys and repos volume for git repositories:
+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
diff --git a/start.sh b/start.sh
@@ -3,6 +3,7 @@
cd /home/git
# Si hay alguna clave pública en la carpeta de keys
+# copia su contenido en authorized_keys
if [ "$(ls -A /git-server/keys/)" ]; then
cat /git-server/keys/*.pub > .ssh/authorized_keys
chown -R git:git .ssh