我有使用dockerized的Web应用程序(.net core mvc),我可以使用内部IP地址进行访问,但无法使用Windows VM公共IP地址(例如:13.88.82.123:7272)进行访问,并且无法重定向我的域来自cloudflare。
我已经尝试过网络模式主机和其他一些网络示例。这是我的docker-compose文件。
services:
web:
container_name: ciroplus
image: tasmehmetcan/samplenetcoreapp:latest
hostname: testciroplus.dogostore.com
depends_on:
- "redis_image"
environment:
- ASPNETCORE_URLS=http://*:1905
links:
- "redis_image"
redis_image:
image: redis
container_name: cache
ports:
- "6379:6379"
proxy:
image: vc-nginx
build:
context: ./nginx
dockerfile: Dockerfile
network: host
ports:
- '7272:8080'
environment:
VIRTUAL_HOST: blabla.mydomain.com
expose:
- "7272"
depends_on:
- web
links:
- web:web1
答案 0 :(得分:0)
您可以更详细地说明您的配置吗?您的Windows VM是否运行Windows 10客户端,并且正在Linux容器模式下运行?