我不能用docker-compose启动gitlab-ce

我想在我的电脑上安装GitLab并学习Docker。

当我使用

docker run --hostname monlogiciel.com --publish 443:443 --publish 8000:80 --publish 22:22 --name gitlab --volume ~/dev/docker/gitlab/config:/etc/gitlab --volume ~/dev/docker/gitlab/logs:/var/log/gitlab --volume ~/dev/docker/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:latest 

它的工作原理:我可以连接到http:// monlogiciel:8000 /和Gitlab在这里。

我的/etc/hosts包含

 127.0.0.1 localhost monlogiciel.com 

但是,当我想使用docker-compose up -d ,它不起作用。

这是我的docker组成:

 version: '3.3' services: gitlab: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'monlogiciel.com' ports: - '8000:80' - '443:443' - '22:22' volumes: - '~/dev/docker/gitlab/config:/etc/gitlab' - '~/dev/docker/gitlab/logs:/var/log/gitlab' - '~/dev/docker/gitlab/data:/var/opt/gitlab' 

那有什么问题?

这是日志

 gitlab_1 | ==> /var/log/gitlab/unicorn/unicorn_stderr.log <== 

gitlab_1 | 我,[2017-09-29T10:09:40.311993#1493] INFO – :监听addr = 127.0.0.1:8080 fd = 19 gitlab_1 | F [2017-09-29T10:09:40.314300#1493]致命错误 – :error add listener addr = / var / opt / gitlab / gitlab-rails / sockets / gitlab.socket gitlab_1 | Errno :: ENAMETOOLONG:文件名太长 – connect(2)for /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122: initialize' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in initialize' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in新的'gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in bind_listen' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:231:in bind_listen' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:231:in listen'gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in block in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in block in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in block in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in每个'gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:130:in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:130:in bind_new_listeners!' gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:130:in start'gitlab_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in <top (required)>' gitlab_1 | /opt/gitlab/embedded/bin/unicorn:23:in <top (required)>' gitlab_1 | /opt/gitlab/embedded/bin/unicorn:23:in load'gitlab_1 | / opt / gitlab / embedded / bin / unicorn:23:在“gitlab_1 | gitlab_1 | ==> /var/log/gitlab/unicorn/unicorn_stdout.log <== gitlab_1 | bundler:未能加载命令:unicorn(/ opt / gitlab / embedded / bin / unicorn)gitlab_1 | gitlab_1 | ==> / var / log / gitlab / gitlab-monitor / current <== gitlab_1 | 2017-09-29_10:09:41.06751 127.0.0.1 – – [29 / Sep / 2017:10:09:41 UTC]“GET / sidekiq HTTP / 1.1”200 4177 gitlab_1 | 2017-09-29_10:09:41.06778 – – > / sidekiq gitlab_1 | gitlab_1 | ==> / var / log / gitlab / unicorn / current <== gitlab_1 | 2017-09-29_10:09:41.34741未能启动新的独angular兽大师gitlab_1 | 2017-09-29_10:09:41.36083开始新的独angular兽大师gitlab_1 | gitlab_1 | ==> /var/log/gitlab/unicorn/unicorn_stderr.log <== gitlab_1 | 我,[2017-09-29T10:09:42.015787#1539]信息 – :刷新gem列表gitlab_1 | gitlab_1 | ==> / var / log / gitlab / gitlab-monitor / current <== gitlab_1 | 2017-09-29_10:09:43.35601 127.0.0.1 – – [29 / Sep / 2017:10:09:42 UTC]“GET / database HTTP / 1.1”200 44957 gitlab_1 | 2017-09-29_10:09:43.35632 – – > / database gitlab_1 | 2017-09-29_10:09:45.23931 127.0.0.1 – – [29 / Sep / 2017:10:09:45 UTC]“GET / process HTTP / 1.1”200 457 gitlab_1 | 2017-09-29_10:09:45.23962 – > / process gitlab_1 | GET / sidekiq HTTP / 1.1“200 4177 gitlab_1 | 2017-09-29_10:09:56.06482 127.0.0.1 – – [29 / Sep / 2017:10:09:56 UTC] 2017-09-29_10:09:56.06511 – – > / sidekiq gitlab_1 | gitlab_1 | ==> /var/log/gitlab/gitlab-rails/production.log <== gitlab_1 | Raven 2.5.3configuration不会捕获错误:DSN没有设置gitlab_1 | gitlab_1 | ==> / var / log / gitlab / gitlab-monitor / current <== gitlab_1 | “GET /数据库HTTP / 1.1”200 2017年3月29日星期一上午11时59分00秒CEST | 2017年4月29日星期三127.0.0.1 – – [29 / Sep / 2017:10:09:57 UTC] 2017-09-29_10:09:58.33492 – – > / database gitlab_1 | 2017-09-29_10:10:00.23730 127.0.0.1 – – [29 / Sep / 2017:10:10:00 UTC]“GET / process HTTP / 1.1”200 457 gitlab_1 | 2017-09-29_10:10:00.23766 – – > / process gitlab_1 | gitlab_1 | ==> / var / log / gitlab / unicorn / current <== gitlab_1 | 2017-09-29_10:10:00.62159 Master无法启动,请查看stderr日志以了解详情