mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2026-01-18 13:58:25 +00:00
generate and store ssh host keys at the data store, fixes #62
This commit is contained in:
parent
0a21530bc4
commit
0649c69302
@ -1,6 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
**latest**
|
||||
- generate and store ssh host keys at the data store.
|
||||
- default GITLAB_PROJECTS_LIMIT is now set to 100
|
||||
- use sameersbn/ubuntu:14.04.20140508 base image, the trusted build of sameersbn/ubuntu:14.04.20140505 seems to be broken
|
||||
- use sameersbn/ubuntu:14.04.20140505 base image
|
||||
|
||||
@ -131,6 +131,15 @@ ROOT_PASSWORD=$(pwgen -c -n -1 12)
|
||||
echo "root:$ROOT_PASSWORD" | chpasswd
|
||||
echo User: root Password: $ROOT_PASSWORD
|
||||
|
||||
if [ ! -e /home/git/data/ssh/ssh_host_rsa_key ]; then
|
||||
# create ssh host keys and move them to the data store.
|
||||
dpkg-reconfigure openssh-server
|
||||
mkdir -p /home/git/data/ssh/
|
||||
mv /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub /home/git/data/ssh/
|
||||
fi
|
||||
# configure sshd to pick up the host keys from /home/git/data/ssh/
|
||||
sed -i 's,HostKey /etc/ssh/,HostKey /home/git/data/ssh/,g' -i /etc/ssh/sshd_config
|
||||
|
||||
# start supervisord
|
||||
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||
supervisorctl start sshd
|
||||
|
||||
@ -4,6 +4,9 @@ set -e
|
||||
GITLAB_VERSION=6.8.1
|
||||
SHELL_VERSION=1.9.4
|
||||
|
||||
# remove the host keys generated during openssh-server installation
|
||||
rm -rf /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub
|
||||
|
||||
# add git user
|
||||
adduser --disabled-login --gecos 'GitLab' git
|
||||
passwd -d git
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user