我需要一些帮助来正确配置我的gitlab docker容器从gitlab/gitlab-ce:latest。
我有一个域名nas.toto.eu,我在这个域名上部署了8484端口的gitlab
version: "3.7"
services:
gitlab:
image: 'gitlab/gitlab-ce:latest'
container_name: gitlab
restart: unless-stopped
hostname: 'nas.toto.eu'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://nas.toto.eu'
gitlab_rails['gitlab_shell_ssh_port'] = 2323
ports:
- '8484:80'
- '8585:443'
- '2323:22'
volumes:
- '/volume1/scripts/docker/gitlab/config:/etc/gitlab'
- '/volume1/scripts/docker/gitlab/logs:/var/log/gitlab'
- '/volume1/scripts/docker/gitlab/data:/var/opt/gitlab'
networks:
- gitlab
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab-runner
restart: unless-stopped
depends_on:
- gitlab
volumes:
- '/volume1/scripts/docker/gitlab/gitlab-runner:/etc/gitlab-runner'
- /var/run/docker.sock:/var/run/docker.sock
networks:
- gitlab
networks:
gitlab:它工作得很好,我可以用我的域http://nas.toto.eu:8484随意克隆我的项目。=D
当我尝试使用gitlab-ci时,gitlab使用了错误的url (此url :/上没有端口):
fatal: unable to access 'http://nas.toto.eu/extranet/frontend.git/': Empty reply from server此项目存在于http://nas.toto.eu:8484上而不是http://nas.toto.eu上。另外,当我用webIDE编辑.gitlab-ci.yml文件时,返回到项目的链接也有错误的url。
我有找到clone_url选项在我的跑步者纠正网址,但连接超时。
[[runners]]
name = "first runner"
url = "http://172.24.0.2"
clone_url = "http://172.24.0.2:8484"但我也有同样的错误:
fatal: unable to access 'http://172.24.0.2:8484/extranet/backend.git/': Failed to connect to 172.24.0.2 port 8484: Operation timed out如何才能纠正这一点?是否有特殊的网络配置?
感谢您的回复!
发布于 2021-01-04 00:57:06
经过很长很长一段时间,我找到了很好的配置。问题出在我的gitlab-runner中。事实上,如果可以从外部访问gitlab,并且如果我使用url nas.toto.eu:8484配置我的runner,它就可以工作:
[[runners]]
name = "first runner"
url = "http://nas.toto.eu:8484"
clone_url = "http://nas.toto.eu:8484"我不明白为什么会这样。:(
https://stackoverflow.com/questions/65538036
复制相似问题