mirror of
https://github.com/nicolabs/git-server-docker.git
synced 2026-04-09 23:49:56 +02:00
Added comments
This commit is contained in:
parent
a972c35bfe
commit
feea96d1a4
|
|
@ -22,6 +22,7 @@ RUN mkdir /git-server/keys \
|
||||||
&& echo git:12345 | chpasswd \
|
&& echo git:12345 | chpasswd \
|
||||||
&& mkdir /home/git/.ssh
|
&& mkdir /home/git/.ssh
|
||||||
|
|
||||||
|
# En sshd_config habilitamos acceso por key y deshabilitamos por password
|
||||||
COPY sshd_config /etc/ssh/sshd_config
|
COPY sshd_config /etc/ssh/sshd_config
|
||||||
COPY start.sh start.sh
|
COPY start.sh start.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# git-server-docker
|
# 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
|
### Basic Usage
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ How to make the image:
|
||||||
|
|
||||||
$ docker build -t git-server-docker .
|
$ 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
|
$ 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
|
||||||
|
|
||||||
|
|
|
||||||
1
start.sh
1
start.sh
|
|
@ -3,6 +3,7 @@
|
||||||
cd /home/git
|
cd /home/git
|
||||||
|
|
||||||
# Si hay alguna clave pública en la carpeta de keys
|
# Si hay alguna clave pública en la carpeta de keys
|
||||||
|
# copia su contenido en authorized_keys
|
||||||
if [ "$(ls -A /git-server/keys/)" ]; then
|
if [ "$(ls -A /git-server/keys/)" ]; then
|
||||||
cat /git-server/keys/*.pub > .ssh/authorized_keys
|
cat /git-server/keys/*.pub > .ssh/authorized_keys
|
||||||
chown -R git:git .ssh
|
chown -R git:git .ssh
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue