mac 上搭建gitlabel_macos – 在Mac上使用docker安装gitlab的权限问题

我正在尝试让

Gitlab在本地运行并遇到权限问题:

cp: cannot create regular file '/etc/gitlab/gitlab.rb': Permission denied

我正在运行的命令是

sudo docker run \

--hostname local.gitlab \

--publish 443:443 --publish 80:80 --publish 2200: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

如果我省略了–volumes参数,则前一个命令会成功.

我试过跑步

docker exec -it gitlab update-permissions

docker restart gitlab

但这似乎也没有让事情奏效.

docker ps的输出:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

aa0654ff45e2 gitlab/gitlab-ce:latest "/assets/wrapper" 29 seconds ago Up 3 seconds (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:2200->22/tcp gitlab

来自docker的输出记录gitlab:

Thank you for using GitLab Docker Image!

Current version: gitlab-ce=10.3.2-ce.0

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

Installing gitlab.rb config...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值