From 0dcc1e88a4a9a1fe4745421474fcb3e93bfb87ef Mon Sep 17 00:00:00 2001 From: Vincent Robert Date: Thu, 27 Nov 2014 15:48:19 +0100 Subject: Add Dockerfile to build an Omnibus GitLab image --- docker/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docker/README.md (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000000..ca56a9b35a4 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,42 @@ +What is GitLab? +=============== + +GitLab offers git repository management, code reviews, issue tracking, activity feeds, wikis. It has LDAP/AD integration, handles 25,000 users on a single server but can also run on a highly available active/active cluster. A subscription gives you access to our support team and to GitLab Enterprise Edition that contains extra features aimed at larger organizations. + + + +![GitLab Logo](https://gitlab.com/uploads/appearance/logo/1/brand_logo-c37eb221b456bb4b472cc1084480991f.png) + + +How to use this image. +====================== + +I recommend creating a data volume container first, this will simplify migrations and backups: + + docker run --name gitlab_data genezys/gitlab:7.5.1 /bin/true + +This empty container will exist to persist as volumes the 3 directories used by GitLab, so remember not to delete it: + +- `/var/opt/gitlab` for application data +- `/var/log/gitlab` for logs +- `/etc/gitlab` for configuration + +Then run GitLab: + + docker run --detach --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data genezys/gitlab:7.5.1 + +You can then go to `http://localhost:8080/` (or most likely `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `docker start gitlab` and `docker stop gitlab`. + + +How to configure GitLab. +======================== + +This container uses the official Omnibus GitLab distribution, so all configuration is done in the unique configuration file `/etc/gitlab/gitlab.rb`. + +To access GitLab configuration, you can start a new container using the shared data volume container: + + docker run -ti --rm --volumes-from gitlab_data ubuntu vi /etc/gitlab/gitlab.rb + +**Note** that GitLab will reconfigure itself **at each container start.** You will need to restart the container to reconfigure your GitLab. + +You can find all available options in [GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). -- cgit v1.2.1 From 0afa07f7f07c68c74de20f5a353fba60c1752826 Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Tue, 2 Dec 2014 15:19:43 +0100 Subject: Add troubleshooting section to the docker documentation. --- docker/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index ca56a9b35a4..b528b22336f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -8,7 +8,7 @@ GitLab offers git repository management, code reviews, issue tracking, activity ![GitLab Logo](https://gitlab.com/uploads/appearance/logo/1/brand_logo-c37eb221b456bb4b472cc1084480991f.png) -How to use this image. +How to use this image ====================== I recommend creating a data volume container first, this will simplify migrations and backups: @@ -28,7 +28,7 @@ Then run GitLab: You can then go to `http://localhost:8080/` (or most likely `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `docker start gitlab` and `docker stop gitlab`. -How to configure GitLab. +How to configure GitLab ======================== This container uses the official Omnibus GitLab distribution, so all configuration is done in the unique configuration file `/etc/gitlab/gitlab.rb`. @@ -40,3 +40,7 @@ To access GitLab configuration, you can start a new container using the shared d **Note** that GitLab will reconfigure itself **at each container start.** You will need to restart the container to reconfigure your GitLab. You can find all available options in [GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). + +Troubleshooting +========================= +Please see the [troubleshooting](troubleshooting.md) file in this directory. -- cgit v1.2.1 From 9e4d39c0513fc91fc2c844d482e82a8e9df8927d Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 3 Dec 2014 12:41:47 +0100 Subject: Move commands to the readme, rename gitlab to gitlab_app, add PostgreSQL tweaks to gitlab.rb. --- docker/README.md | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index b528b22336f..a2a194bd42c 100644 --- a/docker/README.md +++ b/docker/README.md @@ -11,21 +11,37 @@ GitLab offers git repository management, code reviews, issue tracking, activity How to use this image ====================== -I recommend creating a data volume container first, this will simplify migrations and backups: +At this moment GitLab doesn't have official Docker images. +Build your own based on the Omnibus packages with the following command (it assumes you're in the GitLab repo root directory): - docker run --name gitlab_data genezys/gitlab:7.5.1 /bin/true +```bash +sudo docker build --tag gitlab_image docker/ +``` -This empty container will exist to persist as volumes the 3 directories used by GitLab, so remember not to delete it: +We assume using a data volume container, this will simplify migrations and backups. +This empty container will exist to persist as volumes the 3 directories used by GitLab, so remember not to delete it. + +The directories on data container are: - `/var/opt/gitlab` for application data - `/var/log/gitlab` for logs - `/etc/gitlab` for configuration -Then run GitLab: +Create the data container with: + +```bash +sudo docker run --name gitlab_data gitlab_image /bin/true +``` + +After creating this run GitLab: + +```bash +sudo docker run --detach --name gitlab_app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image +``` - docker run --detach --name gitlab --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data genezys/gitlab:7.5.1 +It might take a while before the docker container is responding to queries. -You can then go to `http://localhost:8080/` (or most likely `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `docker start gitlab` and `docker stop gitlab`. +You can then go to `http://localhost:8080/` (or `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `sudo docker start gitlab_app` and `sudo docker stop gitlab_app`. How to configure GitLab @@ -39,7 +55,7 @@ To access GitLab configuration, you can start a new container using the shared d **Note** that GitLab will reconfigure itself **at each container start.** You will need to restart the container to reconfigure your GitLab. -You can find all available options in [GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). +You can find all available options in [Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). Troubleshooting ========================= -- cgit v1.2.1 From 3838b168b33163d4cbe64b7ff6e6b408bc8d857f Mon Sep 17 00:00:00 2001 From: Sytse Sijbrandij Date: Wed, 3 Dec 2014 12:43:26 +0100 Subject: Add password hint. --- docker/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index a2a194bd42c..a489203d017 100644 --- a/docker/README.md +++ b/docker/README.md @@ -41,7 +41,9 @@ sudo docker run --detach --name gitlab_app --publish 8080:80 --publish 2222:22 - It might take a while before the docker container is responding to queries. -You can then go to `http://localhost:8080/` (or `http://192.168.59.103:8080/` if you use boot2docker). Next time, you can just use `sudo docker start gitlab_app` and `sudo docker stop gitlab_app`. +You can then go to `http://localhost:8080/` (or `http://192.168.59.103:8080/` if you use boot2docker). +You can login with username `root` and password `5iveL!fe`. +Next time, you can just use `sudo docker start gitlab_app` and `sudo docker stop gitlab_app`. How to configure GitLab -- cgit v1.2.1 From 58b58fe44b0924ce24f2f3e5d63b0f99fcf22f9f Mon Sep 17 00:00:00 2001 From: Vincent Robert Date: Thu, 4 Dec 2014 10:38:04 +0100 Subject: gitlab-ctl can now be followed with docker logs --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index a489203d017..e66278632f7 100644 --- a/docker/README.md +++ b/docker/README.md @@ -39,7 +39,7 @@ After creating this run GitLab: sudo docker run --detach --name gitlab_app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image ``` -It might take a while before the docker container is responding to queries. +It might take a while before the docker container is responding to queries. You can follow the configuration process with `docker logs -f gitlab`. You can then go to `http://localhost:8080/` (or `http://192.168.59.103:8080/` if you use boot2docker). You can login with username `root` and password `5iveL!fe`. -- cgit v1.2.1 From 176105eca628b297fbfc20b29146f2a8d5ddd74d Mon Sep 17 00:00:00 2001 From: Vincent Robert Date: Thu, 4 Dec 2014 10:38:35 +0100 Subject: Reword configuration to recommend an interactive command line --- docker/README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index e66278632f7..1fbf703e25c 100644 --- a/docker/README.md +++ b/docker/README.md @@ -51,14 +51,18 @@ How to configure GitLab This container uses the official Omnibus GitLab distribution, so all configuration is done in the unique configuration file `/etc/gitlab/gitlab.rb`. -To access GitLab configuration, you can start a new container using the shared data volume container: +To access GitLab configuration, you can start an interactive command line in a new container using the shared data volume container, you will be able to browse the 3 directories and use your favorite text editor: - docker run -ti --rm --volumes-from gitlab_data ubuntu vi /etc/gitlab/gitlab.rb +```bash +docker run -ti -e TERM=linux --rm --volumes-from gitlab_data ubuntu +vi /etc/gitlab/gitlab.rb +``` **Note** that GitLab will reconfigure itself **at each container start.** You will need to restart the container to reconfigure your GitLab. You can find all available options in [Omnibus GitLab documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). + Troubleshooting ========================= Please see the [troubleshooting](troubleshooting.md) file in this directory. -- cgit v1.2.1 From 4acf25169336b9d7a20782d5ad954a40db8764e0 Mon Sep 17 00:00:00 2001 From: zertrin Date: Thu, 4 Dec 2014 15:58:08 +0100 Subject: Fix typo in the README.md for docker The container name has been previously renamed to "gitlab_app". --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docker/README.md') diff --git a/docker/README.md b/docker/README.md index 1fbf703e25c..58982a238a8 100644 --- a/docker/README.md +++ b/docker/README.md @@ -39,7 +39,7 @@ After creating this run GitLab: sudo docker run --detach --name gitlab_app --publish 8080:80 --publish 2222:22 --volumes-from gitlab_data gitlab_image ``` -It might take a while before the docker container is responding to queries. You can follow the configuration process with `docker logs -f gitlab`. +It might take a while before the docker container is responding to queries. You can follow the configuration process with `docker logs -f gitlab_app`. You can then go to `http://localhost:8080/` (or `http://192.168.59.103:8080/` if you use boot2docker). You can login with username `root` and password `5iveL!fe`. -- cgit v1.2.1