Issues with GitLab Docker


I’m trying run GitLab docker on Fedora 27, so I have pull the image and ran it.
I have got a permission problem, but I cannot fixit cos the container start is failed. Can someone help me with this? Maybe this was asked before.

 # sudo docker run --detach \
 --publish 443:443 --publish 80:80 \
 --name gitlab \
 --volume /git/gitlab/config:/etc/gitlab \
 --volume /git/gitlab/logs:/var/log/gitlab \
 --volume /git/gitlab/data:/var/opt/gitlab \

 # docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

# sudo docker logs gitlab
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=11.4.4-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
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...
cp: cannot create regular file '/etc/gitlab/gitlab.rb': Permission denied

# docker exec -it gitlab update-permissions
Error response from daemon: Container 420e7fb8cdc147529f70eb6647ef7428b4cfdc94c5879b50c707d5fba362fb53 is not running

Thanks in advance!!!

Looking at:


 --volume /git/gitlab/config:/etc/gitlab

Does the /git/gitlab/config directory exist and does it have the right permissions?

Option 1. disable SELinux. (Not recommend)
Option 2.
sudo docker run --detach
–publish 443:443 --publish 80:80 --publish 22:22
–name gitlab
–restart always
–volume /srv/gitlab/config:/etc/gitlab:Z
–volume /srv/gitlab/logs:/var/log/gitlab:Z
–volume /srv/gitlab/data:/var/opt/gitlab:Z

I had same problem and i solved it.