Tested in Ubuntu 14.04.4 LTS
Docker version 1.10.2, build c3959b1
https://hub.docker.com/r/gitlab/gitlab-ce/
get the image of gitlab docker pull gitlab/gitlab-ce
run the image sudo docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log /gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
error 500 If you experience 500 issues that huygens describes when upgrading to 8.6.x you can fix using the following steps: Start your container as normal, then execute the following steps:
docker exec -it gitlab /bin/bash
sudo su - gitlab-psql
export PGHOST="/var/opt/gitlab/postgresql"
psql gitlabhq_production
CREATE EXTENSION pg_trgm;
\q
+ Enter
to exit psql
exit
back to root
user
gitlab-rake db:migrate
gitlab-ctl reconfigure
Ref: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1185#note_4424525
set sendEmail vim /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from' ] = 'yourname@qq.com'
gitlab_rails['smtp_enable' ] = true
gitlab_rails['smtp_address' ] = "smtp.qq.com"
gitlab_rails['smtp_port' ] = 25
gitlab_rails['smtp_user_name' ] = "yourname@qq.com"
gitlab_rails['smtp_password' ] = "yourpassword"
gitlab_rails['smtp_domain' ] = "smtp.qq.com"
gitlab_rails['smtp_authentication' ] = "login"
gitlab_rails['smtp_enable_starttls_auto' ] = true
gitlab_rails['smtp_tls' ] = false
gitlab_rails['smtp_openssl_verify_mode' ] = 'peer'
ensure gitlab_rails['gitlab_email_from']
is equal to gitlab_rails['smtp_user_name']