V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yamada
V2EX  ›  .NET

尝试使用 docker asp.net mvc5,但是卡在 dnu restore

  •  
  •   yamada · 2015-08-19 21:35:14 +08:00 · 2837 次点击
    这是一个创建于 3361 天前的主题,其中的信息可能已经有所发展或是发生改变。

    想要将生产环境从 WINDOWS 切换到 CENTOS 来,但项目是 ASP.NET 的于是打算使用 Docker asp.net mvc5 ,参照 https://github.com/aspnet/Home/blob/dev/GettingStartedDeb.md 示例,使用 docker build -t aspnet-home-helloweb . 卡在了 dnu restore 还原包这步上,一直提示 http request timeout ,服务器是 LINODE 上的 VPS 应该不是网络环境的原因…… GOOGLE 了一下找到 https://github.com/aspnet/dnx/issues/1590 ,按里面的说法
    export MONO_THREADS_PER_CPU=2000
    并没有用
    有人用过这个知道怎么解决吗……?

    以下是 Dockerfile:

    FROM microsoft/aspnet
    ENV MONO_THREADS_PER_CPU = 2000
    COPY project.json /app/
    WORKDIR /app
    RUN ["dnu", "restore", "-s", "https://api.nuget.org/v3/index.json"]
    COPY . /app

    EXPOSE 5004
    ENTRYPOINT ["dnx", "project.json", "kestrel"]

    错误提示:

    Warning: FindPackagesById: System.Private.Networking
    HTTP request timed out. Retrying.
    GET https://az320820.vo.msecnd.net/v3-flatcontainer/system.private.networking/index.json
    Warning: FindPackagesById: System.Reflection.Primitives
    HTTP request timed out. Retrying.
    GET https://az320820.vo.msecnd.net/v3-flatcontainer/system.reflection.primitives/index.json
    Warning: FindPackagesById: System.Runtime.Handles
    HTTP request timed out. Retrying.
    GET https://az320820.vo.msecnd.net/v3-flatcontainer/system.runtime.handles/index.json
    Error: DownloadPackageAsync: https://az320820.vo.msecnd.net/v3-flatcontainer/system.threading/4.0.10-beta-23109/system.threading.4.0.10-beta-23109.nupkg
    HTTP request timed out. Exiting.
    Error: DownloadPackageAsync: https://az320820.vo.msecnd.net/v3-flatcontainer/system.threading.tasks/4.0.10-beta-23109/system.threading.tasks.4.0.10-beta-23109.nupkg
    HTTP request timed out. Exiting.
    Error: DownloadPackageAsync: https://az320820.vo.msecnd.net/v3-flatcontainer/system.threading.thread/4.0.0-beta-23109/system.threading.thread.4.0.0-beta-23109.nupkg
    HTTP request timed out. Exiting.
    Error: DownloadPackageAsync: https://az320820.vo.msecnd.net/v3-flatcontainer/system.threading.threadpool/4.0.10-beta-23109/system.threading.threadpool.4.0.10-beta-23109.nupkg
    HTTP request timed out. Exiting.
    Error: DownloadPackageAsync: https://az320820.vo.msecnd.net/v3-flatcontainer/microsoft.aspnet.diagnostics.abstractions/1.0.0-beta6/microsoft.aspnet.diagnostics.abstractions.1.0.0-beta6.nupkg
    HTTP request timed out. Exiting.

    1 条回复    2015-11-17 12:11:48 +08:00
    loqixh
        1
    loqixh  
       2015-11-17 12:11:48 +08:00
    用 coreclr 版。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3021 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 14:27 · PVG 22:27 · LAX 07:27 · JFK 10:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.