V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yadgen
V2EX  ›  Docker

win11 > vmware > ubuntu22.04 > docker > 容器执行命令 yarn install 发生了请求网络问题

  •  
  •   yadgen · Sep 14, 2024 · 1803 views
    This topic created in 603 days ago, the information mentioned may be changed or developed.

    本机是 win11 ,安装了 vmare ,安装了 ubuntu22.04 ,安装了 docker ,容器执行命令得到如下网络错误信息: "info There appears to be trouble with your network connection."

    虚拟使用的是桥接,浏览器和终端都可以使用 VPN Dockerfile 增加一些命令,当然是在 yarn install 之前增加的 RUN yarn config set registry https://registry.npmjs.org/ RUN yarn config set proxy xxx RUN yarn config set https-proxy xxx

    ubuntu 尝试了 npm 设置代理,yarn 设置代理,docker 设置代理,网上搜了很多答案,很久的答案,都没有解决我的问题。 凌晨 6 点的时候突然没有发生,正常运行,重启之后,问题再次出现,并无法解决。 特来请教各位大佬,非常感谢。

    vk42
        1
    vk42  
       Sep 15, 2024
    先说明下宿主机网络什么情况啊,是必须通过代理访问外网?
    yadgen
        2
    yadgen  
    OP
       Sep 17, 2024
    @vk42
    宿主机一切正常,yarn install 执行老是失败。
    yadgen
        3
    yadgen  
    OP
       Sep 17, 2024
    @vk42
    我发现一个问题,我不用 Dockerfile 执行 yarn install & yarn build
    手动运行镜像,运行命令,是可以的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1542 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 16:33 · PVG 00:33 · LAX 09:33 · JFK 12:33
    ♥ Do have faith in what you're doing.