mirror of
https://github.com/nicolabs/git-server-docker.git
synced 2025-09-07 18:11:08 +02:00
Translated comments form spanish to english
This commit is contained in:
parent
1acc99a94c
commit
ef8442706c
13
Dockerfile
13
Dockerfile
|
@ -2,23 +2,24 @@ FROM alpine:3.4
|
|||
|
||||
MAINTAINER José Carlos Bernárdez "jkarlosb@gmail.com"
|
||||
|
||||
# --no-cache es nuevo en Alpine 3.3 y evita tener que utilizar
|
||||
# --update + rm -rf /var/cache/apk/* (borrar el caché)
|
||||
# "--no-cache" is new in Alpine 3.3 and it avoid using
|
||||
# "--update + rm -rf /var/cache/apk/*" (to remove cache)
|
||||
RUN apk add --no-cache \
|
||||
# openssh=7.2_p2-r1 \
|
||||
openssh \
|
||||
# git=2.8.3-r0
|
||||
git
|
||||
|
||||
# Generamos las claves del servidor
|
||||
# Key generation on the server
|
||||
RUN ssh-keygen -A
|
||||
|
||||
# Para que ssh se auto-arranque
|
||||
# SSH autorun
|
||||
# RUN rc-update add sshd
|
||||
|
||||
WORKDIR /git-server/
|
||||
|
||||
# Con -D no creamos password, con -s le cambiamos la shell
|
||||
# -D flag avoids password generation
|
||||
# -s flag changes user's shell
|
||||
RUN mkdir /git-server/keys \
|
||||
&& adduser -D -s /usr/bin/git-shell git \
|
||||
&& echo git:12345 | chpasswd \
|
||||
|
@ -31,7 +32,7 @@ RUN mkdir /git-server/keys \
|
|||
# More info: https://git-scm.com/docs/git-shell
|
||||
COPY git-shell-commands /home/git/git-shell-commands
|
||||
|
||||
# En sshd_config habilitamos acceso por key y deshabilitamos por password
|
||||
# sshd_config file is edited for enable access key and disable access password
|
||||
COPY sshd_config /etc/ssh/sshd_config
|
||||
COPY start.sh start.sh
|
||||
|
||||
|
|
6
start.sh
6
start.sh
|
@ -2,8 +2,8 @@
|
|||
|
||||
cd /home/git
|
||||
|
||||
# Si hay alguna clave pública en la carpeta de keys
|
||||
# copia su contenido en authorized_keys
|
||||
# If there is some public key in keys folder
|
||||
# then it copies its contain in authorized_keys file
|
||||
if [ "$(ls -A /git-server/keys/)" ]; then
|
||||
cat /git-server/keys/*.pub > .ssh/authorized_keys
|
||||
chown -R git:git .ssh
|
||||
|
@ -11,5 +11,5 @@ if [ "$(ls -A /git-server/keys/)" ]; then
|
|||
chmod -R 600 .ssh/*
|
||||
fi
|
||||
|
||||
# Bandera -D para que no se ejecute como demonio
|
||||
# -D flag avoids executing sshd as a daemon
|
||||
/usr/sbin/sshd -D
|
||||
|
|
Loading…
Reference in a new issue