我遵循以下https://docs.gitlab.com/omnibus/docker/#install-gitlab-using-docker-compose
,使用以下docker-compose.yml来启动docker容器实例我的docker-compose.yml
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.bob.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.bob.com:8929'
gitlab_rails['gitlab_shell_ssh_port'] = 2224
#nginx['redirect_http_to_https'] = true
nginx['listen_port'] = 8929
nginx['ssl_certificate'] = '/etc/gitlab/ssl/gitlab.crt'
nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/gitlab.key'
# Add any other gitlab.rb configuration here, each on its own line
ports:
- '8929:8929'
- '443:443'
- '2224:22'
volumes:
- '/home/bob/gitlab/config:/etc/gitlab'
- '/home/bob/gitlab/logs:/var/log/gitlab'
- '/home/bob/gitlab/data:/var/opt/gitlab'
如果我在Opera浏览器中输入172.29.128.166:8929,就可以访问gitlab。如果我在Chrome浏览器中键入172.29.128.166:8929,则无法访问它。 如果我输入gitlab.bob.com:8929,则无法访问gitlab。
我的主机和远程服务器在同一网络上。我该如何使用它?