Hello, GitLab community. I have a question about self-managed GitLab-CE in Docker. I want to know how to link the host machine gitlab.rb and the gitlab.rb in the Docker container.
I have created a Docker container with a running GitLab instance using docker-compose.yml as follows:
version: '3.8' services: gitlab-ce: image: gitlab/gitlab-ce:latest ports: - "8880:80/tcp" - "8443:443/tcp" - "8222:22/tcp" volumes: - '/home/userme/.gitlab/etc:/etc/gitlab' - '/home/userme/.gitlab/var/log:/var/log/gitlab' - '/home/userme/.gitlab/var/opt:/var/opt/gitlab'
In the folder ~/.gitlab/etc, I have a file gitlab.rb, but this file is not related to the running Docker container /etc/gitlab.rb file. So, if I want to change the config, I need to do docker exec containername bash to edit the real config. How can I link these two files so that I can edit gitlab.rb on the host machine, not in the Docker container only?
if i add
- '/home/userme/.gitlab/etc/gitlab.rb:/etc/gitlab/gitlab.rb' and then stop docker and do docker-compose up, does it destruct existing repos in docker?