peanutBark
V2EX  ›  Docker

win 上的 docker 如何使用宿主机发送网络请求

  •  
  •   peanutBark · Mar 8, 2024 · 1986 views
    This topic created in 979 days ago, the information mentioned may be changed or developed.

    因为有些服务在局域网,可能限制了,容器里无法访问,但 docker host 又不支持 windows 。 主要是希望可以让容器以 host 的名义去发起网络请求

    3 replies  •  2024-03-12 12:40:45 +08:00
    Alethea
    Alethea
    Mar 9, 2024 via Android
    1
    直接把容器网络改成 host 不就行了
    peanutBark
    peanutBark
    OP
    Mar 11, 2024
    2
    @Alethea 只有 linux 支持 host......
    Alethea
    Alethea
    Mar 12, 2024
    3
    @peanutBark 我以为都支持,没看到不好意思,你的局域网服务用的什么内网网段,只要网段不同应该是可以访问的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4710 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 03:36 · PVG 11:36 · LAX 19:36 · JFK 22:36
    ♥ Do have faith in what you're doing.