2016-02-22 13 views
8

चल रहा है मैं इन निर्देशों का पालन कर रहा हूँ: http://doc.gitlab.com/omnibus/dockerGitlab डोकर

हालांकि http://localhost है Webpage is not available कहते हैं। अगर मैं docker ps को फिर से चलाएं

[email protected]:~$ docker version 
    Client: 
    Version:  1.9.1 
    API version: 1.21 
    Go version: go1.4.3 
    Git commit: a34a1d5 
    Built:  Fri Nov 20 17:56:04 UTC 2015 
    OS/Arch:  linux/amd64 

    Server: 
    Version:  1.9.1 
    API version: 1.21 
    Go version: go1.4.3 
    Git commit: a34a1d5 
    Built:  Fri Nov 20 17:56:04 UTC 2015 
    OS/Arch:  linux/amd64 

    [email protected]:~$ 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 
    613d4d2d612f977d3d25746a169d9209acb864e57c5184083dccd02b1e4a157c 

    [email protected]:~$ docker ps 
    CONTAINER ID  IMAGE      COMMAND    CREATED    STATUS    PORTS               NAMES 
    613d4d2d612f  gitlab/gitlab-ce:latest "/assets/wrapper" 4 seconds ago  Up 2 seconds  0.0.0.0:22->22/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp gitlab 

मैं इस मिल:

यहाँ आदेशों कि मैं चल रहा हूँ (Ubuntu 14.04 LTS) कर रहे हैं

CONTAINER ID  IMAGE      COMMAND    CREATED    STATUS        PORTS               NAMES 
    613d4d2d612f  gitlab/gitlab-ce:latest "/assets/wrapper" 9 minutes ago  Restarting (1) About a minute ago 0.0.0.0:22->22/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp gitlab 

इसे कहते हैं Restarting about a minute ago... ... कि मतलब है आंतरिक रूप से कुछ गलत है?

[संपादित - जोड़ना लॉग]

[email protected]:~$ sudo mkdir -p /var/log/gitlab/reconfigure 

    [email protected]:~$ 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 
    f4dee0a603bdc95594e8a77d51762f2d78d44ec077f2d57645e651ed628a4d6b 

    [email protected]:~$ docker logs 
    docker: "logs" requires 1 argument. 
    See 'docker logs --help'. 

    Usage: docker logs [OPTIONS] CONTAINER 

    Fetch the logs of a container 

    [email protected]:~$ docker logs gitlab 
    Thank you for using GitLab Docker Image! 
    Current version: gitlab-ce=8.5.0-ce.1 

    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file 
    And restart this container to reload settings. 
    To do it use docker exec: 

    docker exec -it gitlab vim /etc/gitlab/gitlab.rb 
    docker restart gitlab 

    For a comprehensive list of configuration options please see the Omnibus GitLab readme 
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 

    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... 
    /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted 
    /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system 
    [2016-02-23T01:16:47+00:00] FATAL: Failed to open or create log file at /var/log/gitlab/reconfigure/1456190207.log: Errno::ENOENT (No such file or directory @ rb_sysopen - /var/log/gitlab/reconfigure/1456190207.log) 
    [2016-02-23T01:16:47+00:00] FATAL: Aborting due to invalid 'log_location' configuration 
    Thank you for using GitLab Docker Image! 
    Current version: gitlab-ce=8.5.0-ce.1 

    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file 
    And restart this container to reload settings. 
    To do it use docker exec: 

    docker exec -it gitlab vim /etc/gitlab/gitlab.rb 
    docker restart gitlab 

    For a comprehensive list of configuration options please see the Omnibus GitLab readme 
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 

    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... 
    /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted 
    /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system 
    [2016-02-23T01:16:51+00:00] FATAL: Failed to open or create log file at /var/log/gitlab/reconfigure/1456190211.log: Errno::ENOENT (No such file or directory @ rb_sysopen - /var/log/gitlab/reconfigure/1456190211.log) 
    [2016-02-23T01:16:51+00:00] FATAL: Aborting due to invalid 'log_location' configuration 
    Thank you for using GitLab Docker Image! 
    Current version: gitlab-ce=8.5.0-ce.1 

    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file 
    And restart this container to reload settings. 
    To do it use docker exec: 

    docker exec -it gitlab vim /etc/gitlab/gitlab.rb 
    docker restart gitlab 

    For a comprehensive list of configuration options please see the Omnibus GitLab readme 
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 

    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... 
    /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted 
    /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system 
    [2016-02-23T01:16:56+00:00] FATAL: Failed to open or create log file at /var/log/gitlab/reconfigure/1456190216.log: Errno::ENOENT (No such file or directory @ rb_sysopen - /var/log/gitlab/reconfigure/1456190216.log) 
    [2016-02-23T01:16:56+00:00] FATAL: Aborting due to invalid 'log_location' configuration 
    Thank you for using GitLab Docker Image! 
    Current version: gitlab-ce=8.5.0-ce.1 

    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file 
    And restart this container to reload settings. 
    To do it use docker exec: 

    docker exec -it gitlab vim /etc/gitlab/gitlab.rb 
    docker restart gitlab 

    For a comprehensive list of configuration options please see the Omnibus GitLab readme 
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 

    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... 
    /opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted 
    /opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system 
    [2016-02-23T01:17:02+00:00] FATAL: Failed to open or create log file at /var/log/gitlab/reconfigure/1456190222.log: Errno::ENOENT (No such file or directory @ rb_sysopen - /var/log/gitlab/reconfigure/1456190222.log) 
    [2016-02-23T01:17:02+00:00] FATAL: Aborting due to invalid 'log_location' configuration 
    Thank you for using GitLab Docker Image! 
    Current version: gitlab-ce=8.5.0-ce.1 

    Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file 
    And restart this container to reload settings. 
    To do it use docker exec: 

    docker exec -it gitlab vim /etc/gitlab/gitlab.rb 
    docker restart gitlab 

    For a comprehensive list of configuration options please see the Omnibus GitLab readme 
    https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md 

    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 


    [email protected]:~$ docker ps 
    CONTAINER ID  IMAGE      COMMAND    CREATED    STATUS       PORTS               NAMES 
    f4dee0a603bd  gitlab/gitlab-ce:latest "/assets/wrapper" 39 seconds ago  Restarting (1) 4 seconds ago 0.0.0.0:22->22/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp gitlab 

यह अभी भी बूट नहीं करता है, यहां तक ​​कि /var/log/gitlab/reconfigure मैन्युअल बनाने के बाद।

+0

सुनिश्चित नहीं हैं कि क्या चल रहा है। लेकिन, कृपया 'डॉकर लॉग gitlab' के आउटपुट प्रदान करें। वहां हम देख सकते हैं कि गिटलैब स्टार्टअप में कुछ गलत हुआ है या नहीं। –

+0

तो आप 'डॉकर लॉग 613d4d2d612f' – BMW

उत्तर

6

मेरे लिए निम्नलिखित समस्या हल हो गई करने के लिए डोकर आदेश में संशोधन:

sudo docker run -i \ 
    --hostname ubuntu \ 
    --publish 443:443 --publish 80:80 --publish 2222: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 \ 
    --volume /srv/gitlab/logs/reconfigure:/var/log/gitlab/reconfigure \ 
    gitlab/gitlab-ce:latest 

नोट मैं -i इस्तेमाल किया तो मैं इसे शुरू देख सकते हैं, लेकिन आप इसे --detach वापस करने के लिए सेट कर सकते हैं।

+0

यह चाल है - धन्यवाद! – Ole

+2

कमांड को संशोधित करने के लिए यह आवश्यक नहीं है। मैन्युअल रूप से निर्देशिका बनाने से चाल भी हुई। Http://stackoverflow.com/a/35566517/2966331 देखें –

6

मुझे यह समस्या भी थी और इसे खोने वाले फ़ोल्डर को बनाकर हल किया गया। स्क्रिप्ट द्वारा स्वयं बनाया जाना चाहिए था।

/srv/gitlab/logs/reconfigure

+0

हाँ से क्या प्राप्त करते हैं, यह काम करता है। दरअसल यह वॉल्यूम मैपिंग को जोड़ने के समान है: - वॉल्यूम/एसआरवी/गिटलैब/लॉग/पुन: कॉन्फ़िगर:/var/log/gitlab/reconfigure – Bright

+1

यहां मेरे लिए कोई भाग्य नहीं है। गिटलैब ने मेजबान पर उस फ़ोल्डर को पहले से ही बनाया है और 'डॉकर निष्पादन -it गिटलैब अपडेट-अनुमतियां' रिपोर्ट चला रहा है, जिसमें यह कई फाइलें नहीं मिल पाती हैं जिनके लिए यह स्पष्ट नहीं है कि यह उन्हें बनाने में सक्षम क्यों नहीं है अगर यह पहले से ही कई अन्य फ़ोल्डरों को बनाया गया है और पहले से ही उन बिन-माउंटेड फ़ोल्डर्स में फ़ाइलें। –

1

क्या लॉग कहते कार्य करें:

docker exec -it gitlab update-permissions 
docker restart gitlab 
0

का उपयोग नहीं नवीनतमgitlab/gitlab-ce:latest छवि मेरे लिए काम किया।

लेकिन gitlab/gitlab-ce:9.5.4-ce.0 मेरे लिए काम किया।

मैं कुछ हद तक एक ही मुद्दे से जूझ रहा था। यह पुनरारंभ करना जारी रखा। लॉग्स जहां फ़ाइल अनुमतियों के बारे में बात करते हैं और त्रुटियों को संकलित भी करते हैं।

यहाँ मेरी शुरुआत सेटिंग है:

#sudo docker run -i \ 
sudo docker run --detach \ 
    --env GITLAB_OMNIBUS_CONFIG="external_url 'http://192.168.56.101/'; gitlab_rails['lfs_enabled'] = true;" \ 
    --hostname ubse-gitlab \ 
    --publish 443:443 --publish 80:80 --publish 23: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 \ 
    --volume /srv/gitlab/logs/reconfigure:/var/log/gitlab/reconfigure \ 
    gitlab/gitlab-ce:9.5.4-ce.0