mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-02-17 09:37:49 +01:00
fixes
Signed-off-by: Jess Frazelle <jess@mesosphere.com>
This commit is contained in:
parent
3dc19702e0
commit
2b0af26ae9
|
@ -22,19 +22,14 @@ RUN apk update && apk add \
|
||||||
&& adduser -D -S -s /usr/bin/git-shell -h /home/git -g git git \
|
&& adduser -D -S -s /usr/bin/git-shell -h /home/git -g git git \
|
||||||
&& mkdir -p /home/git/.ssh \
|
&& mkdir -p /home/git/.ssh \
|
||||||
&& chown -R git:git /home/git \
|
&& chown -R git:git /home/git \
|
||||||
&& passwd -u git \
|
&& passwd -u git
|
||||||
&& { \
|
|
||||||
echo 'create_repo(){'; \
|
|
||||||
echo 'git init --bare $1'; \
|
|
||||||
echo 'chown -R git:git $1'; \
|
|
||||||
echo '}'; \
|
|
||||||
} > /etc/profile
|
|
||||||
|
|
||||||
ENV HOME /home/git
|
ENV HOME /home/git
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
WORKDIR $HOME
|
WORKDIR $HOME
|
||||||
|
|
||||||
COPY ./start.sh /
|
COPY ./start.sh /
|
||||||
|
COPY create_repo /usr/bin/create_repo
|
||||||
|
|
||||||
ENTRYPOINT ["/start.sh"]
|
ENTRYPOINT ["/start.sh"]
|
||||||
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config"]
|
CMD ["/usr/sbin/sshd", "-D", "-e", "-f", "/etc/ssh/sshd_config"]
|
||||||
|
|
12
gitserver/create_repo
Executable file
12
gitserver/create_repo
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
repo=$1
|
||||||
|
if [ $repo != *.git ]; then
|
||||||
|
repo="${repo}.git"
|
||||||
|
fi
|
||||||
|
echo "Creating $repo"
|
||||||
|
(
|
||||||
|
cd "$HOME"
|
||||||
|
git init --bare "$repo"
|
||||||
|
chown -R git:git "$repo"
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user