mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-12-08 22:32:39 +01:00
@@ -28,7 +28,7 @@ RUN apk update && apk add \
|
||||
echo 'git init --bare $1'; \
|
||||
echo 'chown -R git:git $1'; \
|
||||
echo '}'; \
|
||||
} > /home/git/.bashrc
|
||||
} > /etc/profile
|
||||
|
||||
ENV HOME /home/git
|
||||
EXPOSE 22
|
||||
|
||||
@@ -11,8 +11,13 @@ if [ ! -f "${HOSTKEY}" ]; then
|
||||
ssh-keygen -A
|
||||
fi
|
||||
|
||||
mkdir -p ${HOME}/.ssh
|
||||
source /etc/profile
|
||||
[ "$PUBKEY" ] && echo "$PUBKEY" > ${HOME}/.ssh/authorized_keys
|
||||
|
||||
chown -R git:git ${HOME}
|
||||
chmod -R 755 ${HOME}
|
||||
|
||||
# Fix permissions, if writable
|
||||
if [ -w ${HOME}/.ssh ]; then
|
||||
chown git:git ${HOME}/.ssh && chmod 700 ${HOME}/.ssh/
|
||||
|
||||
Reference in New Issue
Block a user