User Tools

Site Tools


ubuntu-docker-gitlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ubuntu-docker-gitlab [2017/01/10 07:38]
ngenseb
ubuntu-docker-gitlab [2017/01/10 11:18] (current)
ngenseb
Line 19: Line 19:
 Then, run gitlab from docker : Then, run gitlab from docker :
  
 +(use **-i** to display startup logs or **–detach** for a silent startup)
 <​code>​ <​code>​
-sudo docker run --detach ​+sudo docker run -
-    --hostname gitlab.example.com \+    --hostname ​local.ngen.gitlab.be \ 
 +    --env GITLAB_OMNIBUS_CONFIG="​external_url '​http://​local.ngen.gitlab.be'; gitlab_rails['​lfs_enabled'​] = true;" ​\
     --publish 10443:443 --publish 10080:80 --publish 10022:22 \     --publish 10443:443 --publish 10080:80 --publish 10022:22 \
     --name gitlab \     --name gitlab \
Line 29: Line 31:
     --volume /​srv/​gitlab/​data:/​var/​opt/​gitlab \     --volume /​srv/​gitlab/​data:/​var/​opt/​gitlab \
     gitlab/​gitlab-ce:​latest     gitlab/​gitlab-ce:​latest
 +</​code>​
 +
 +Personal experience :
 +
 +When starting up using -i, I noticed this output :
 +
 +<​code>​
 +seb@ubuntu:​~$ sudo docker run -i \
 +
 +...
 +
 +If this container fails to start due to permission problems try to fix it by executing:
 +
 +  docker exec -it gitlab update-permissions
 +  docker restart gitlab
 +
 +Preparing services...
 +Starting services...
 +Configuring GitLab package...
 +/​opt/​gitlab/​embedded/​bin/​runsvdir-start:​ line 24: ulimit: pending signals: cannot modify limit: Operation not permitted
 +/​opt/​gitlab/​embedded/​bin/​runsvdir-start:​ line 37: /​proc/​sys/​fs/​file-max:​ Read-only file system
 +Configuring GitLab...
 +gitlab Reconfigured!
 +</​code>​
 +
 +Therefore I ran those commands :
 +
 +<​code>​
 +docker exec -it gitlab update-permissions
 +docker restart gitlab
 </​code>​ </​code>​
  
Line 37: Line 69:
 </​code>​ </​code>​
  
-{{:docker-ps-list-running-container.png?​nolink&​1663x104}}+OUTPUT HERE… 
 + 
 +How to inspect existing containers ​: 
 + 
 +<​code>​ 
 +docker ps -
 +</​code>​ 
 + 
 +OUTPUT HERE… 
 + 
 +If you need to remove a container 
 + 
 +<​code>​ 
 +docker rm drunk_fermi 
 +</​code>​ 
 + 
 +or forcefully using, 
 + 
 +<​code>​ 
 +docker rm -f drunk_fermi 
 +</​code>​ 
 + 
 +===== Configure GitLab ===== 
 + 
 +Access the GitLab shell 
 + 
 +<​code>​ 
 +sudo docker exec -it gitlab /bin/bash 
 +</​code>​ 
 + 
 +Access directly the main config file 
 + 
 +<​code>​ 
 +sudo docker exec -it gitlab /bin/bash 
 +</​code>​
  
  
ubuntu-docker-gitlab.1484030303.txt.gz · Last modified: 2017/01/10 07:38 by ngenseb