Docker:无法连接到gitlab实例

时间:2018-07-07 09:36:03

标签: docker

我正在尝试在其中一台服务器(gitlab实例)上设置docker,但无法使该实例正常工作。特别是网络是我无法正确理解的事情。

这是我用来启动docker的命令:

docker run --name gitlab --hostname gitlab -p 32790:32790 -e GITLAB_OMNIBUS_CONFIG="gitlab_rails['lfs_enabled'] = true; external_url = 'http://gitlab:32790';" gitlab/gitlab-ce:10.3.3-ce.0

这是我从泊坞站获得的网络信息:

"NetworkSettings": {
        "Bridge": "",
        "SandboxID": "8646b3f0e8106eb9e8ea574ce69b48c1782b75f3f3aab52d2d66d8972ac4aa4b",
        "HairpinMode": false,
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "Ports": {
            "22/tcp": null,
            "32790/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "32790"
                }
            ],
            "443/tcp": null,
            "80/tcp": null
        },
        "SandboxKey": "/var/run/docker/netns/8646b3f0e810",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null,
        "EndpointID": "a400fd17542a2be0b7e6ff2e96770c6890f61e91324c3970a8c6425904fbf0b0",
        "Gateway": "172.17.0.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "IPAddress": "172.17.0.2",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "MacAddress": "02:42:ac:11:00:02",
        "Networks": {
            "bridge": {
                "IPAMConfig": null,
                "Links": null,
                "Aliases": null,
                "NetworkID": "924e23784ebcaaf5cf27a91259095c1109c28a09d928e2425b794015c129b736",
                "EndpointID": "a400fd17542a2be0b7e6ff2e96770c6890f61e91324c3970a8c6425904fbf0b0",
                "Gateway": "172.17.0.1",
                "IPAddress": "172.17.0.2",
                "IPPrefixLen": 16,
                "IPv6Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "MacAddress": "02:42:ac:11:00:02",
                "DriverOpts": null
            }
        }
    }

理想的结果是我既可以通过IP地址也可以通过http://gitlab:32790

进行连接

但是我无法使其正常工作...

0 个答案:

没有答案