Skip to content
This repository was archived by the owner on Oct 25, 2019. It is now read-only.

Commit 202259e

Browse files
committed
Initial version
0 parents  commit 202259e

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

Dockerfile

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Data: docker run --name gitlab_data genezys/gitlab:7.5.1 /bin/true
2+
# Run: docker run --detach --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data genezys/gitlab:7.5.1
3+
4+
FROM ubuntu:14.04
5+
MAINTAINER Vincent Robert <[email protected]>
6+
7+
# Install required packages
8+
RUN apt-get update -q \
9+
&& DEBIAN_FRONTEND=noninteractive apt-get install -qy \
10+
openssh-server \
11+
wget \
12+
&& apt-get clean
13+
14+
# Download & Install GitLab
15+
RUN TMP_FILE=$(mktemp); \
16+
wget -q -O $TMP_FILE https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.5.1-omnibus.5.2.0.ci-1_amd64.deb \
17+
&& dpkg -i $TMP_FILE \
18+
&& rm -f $TMP_FILE
19+
20+
# Manage SSHD through runit
21+
RUN mkdir -p /opt/gitlab/sv/sshd/supervise \
22+
&& mkfifo /opt/gitlab/sv/sshd/supervise/ok \
23+
&& printf "#!/bin/sh\nexec 2>&1\numask 077\nexec /usr/sbin/sshd -D" > /opt/gitlab/sv/sshd/run \
24+
&& chmod a+x /opt/gitlab/sv/sshd/run \
25+
&& ln -s /opt/gitlab/sv/sshd /opt/gitlab/service \
26+
&& mkdir -p /var/run/sshd
27+
28+
# Expose web & ssh
29+
EXPOSE 80 22
30+
31+
# Volume & configuration
32+
VOLUME ["/var/opt/gitlab", "/var/log/gitlab", "/etc/gitlab"]
33+
ADD gitlab.rb /etc/gitlab/
34+
35+
# Default is to run runit & reconfigure
36+
CMD gitlab-ctl reconfigure > /var/log/gitlab/reconfigure.log & /opt/gitlab/embedded/bin/runsvdir-start

gitlab.rb

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# External URL should be your Docker instance.
2+
# By default, this example is the "standard" boot2docker IP.
3+
# Always use port 80 here to force the internal nginx to bind port 80,
4+
# even if you intend to use another port in Docker.
5+
external_url "http://192.168.59.103/"
6+
7+
# Some configuration of GitLab
8+
# You can find more at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration
9+
gitlab_rails['gitlab_email_from'] = '[email protected]'
10+
gitlab_rails['gitlab_support_email'] = '[email protected]'
11+
gitlab_rails['time_zone'] = 'Europe/Paris'
12+
13+
# SMTP settings
14+
# You must use an external server, the Docker container does not install an SMTP server
15+
gitlab_rails['smtp_enable'] = true
16+
gitlab_rails['smtp_address'] = "smtp.example.com"
17+
gitlab_rails['smtp_port'] = 587
18+
gitlab_rails['smtp_user_name'] = "user"
19+
gitlab_rails['smtp_password'] = "password"
20+
gitlab_rails['smtp_domain'] = "example.com"
21+
gitlab_rails['smtp_authentication'] = "plain"
22+
gitlab_rails['smtp_enable_starttls_auto'] = true
23+
24+
# Enable LDAP authentication
25+
# gitlab_rails['ldap_enabled'] = true
26+
# gitlab_rails['ldap_host'] = 'ldap.example.com'
27+
# gitlab_rails['ldap_port'] = 389
28+
# gitlab_rails['ldap_method'] = 'plain' # 'ssl' or 'plain'
29+
# gitlab_rails['ldap_allow_username_or_email_login'] = false
30+
# gitlab_rails['ldap_uid'] = 'uid'
31+
# gitlab_rails['ldap_base'] = 'ou=users,dc=example,dc=com'

0 commit comments

Comments
 (0)