我有一个 docker 容器为 gitlab-ce 映像运行此配置:
version: "3"
services:
gitlab:
hostname: gitlab.mydomain.com
image: gitlab/gitlab-ce:latest
container_name: gitlab
restart: always
ports:
- 3000:80
volumes:
- /opt/gitlab/config:/etc/gitlab
- /opt/gitlab/logs:/var/log/gitlab
- /opt/gitlab/data:/var/opt/gitlab
networks:
default:
external:
name: custom_network
运行 docker ps 时,我看到我的容器启动并运行,其中 80 容器端口按预期映射到 3000 主机端口。
运行时非常困难:wget -O- https://172.25.0.2:3000
我收到此错误消息:
Connecting to 172.25.0.2:3000... failed: Connection refused.