HTML5¼¼Êõ

¿çƽ̨ÔËÐÐASP.NET Core 1.0 - B.it(2)

×ÖºÅ+ ×÷ÕߣºH5Ö®¼Ò À´Ô´£º²©¿ÍÔ° 2016-04-17 10:00 ÎÒÒªÆÀÂÛ( )

¿ÉÒÔ´ÓÉϼ¶Ä¿Â¼cli-samplesÖп½±´Ò»¸öNuGet.configµ½HelloMvcĿ¼ÖУ¬ Èç¹ûûÓÐÕâ¸öNuGet.config ÔÚ»¹Ô­packageʱ»áĬÈϵ½.nuget/NuGet/¼ÓÔØNuGet.config¡£ÒòΪԴ²»¶Ô£¬»áµ¼ÖÂijЩpackeageÏÂÔز»µ½¡£ //¿½±´ÃüÁî cp

¿ÉÒÔ´ÓÉϼ¶Ä¿Â¼cli-samplesÖп½±´Ò»¸öNuGet.configµ½HelloMvcĿ¼ÖУ¬Èç¹ûûÓÐÕâ¸öNuGet.config ÔÚ»¹Ô­packageʱ»áĬÈϵ½.nuget/NuGet/¼ÓÔØNuGet.config¡£ÒòΪԴ²»¶Ô£¬»áµ¼ÖÂijЩpackeageÏÂÔز»µ½¡£

//¿½±´ÃüÁî cp -p /root/app/cli-samples/NuGet.Config /root/app/cli-samples/HelloMvc/NuGet.Config

 

5.2.2´´½¨DockerfileÎļþ

ÔÚ´´½¨imageʱ£¬.NET CLI Preview Docker ImageÌṩÁËÁ½¸ö»ù´¡dotnet imageÓÃÓڼ̳У¨ÀïÃæ×°ÔصÄÆäʵÊDz¿ÊðÁË.NET CoreµÄUbuntuϵͳ£©£¬Çø±ðÔÚÓÚËüÃǵÄDockerfile²»Í¬

  • dotnet:0.0.1-alpha
  • dotnet:0.0.1-alpha-onbuild
  • dotnet:0.0.1-alphaµÄDockerfile£¬»ùÓÚbuildpack-deps:trusty-scm

     

     dotnet:0.0.1-alpha-onbuild»ùÓÚdotnet:0.0.1-alpha£¬£¨ONBUILD <Dockerfile¹Ø¼ü×Ö> ONBUILDÖ¸¶¨µÄÃüÁîÔÚ¹¹½¨¾µÏñʱ²¢²»Ö´ÐÐ,¶øÊÇÔÚËüµÄ×Ó¾µÏñÖÐÖ´ÐУ©

     

     

    ËùÒÔHelloMvcµÄDockerfile¿ÉÒÔÓÐÁ½ÖÖд·¨£¬¸÷Ñ¡ÆäÒ»

    (1) »ùÓÚdotnet:0.0.1-alpha

    FROM microsoft/dotnet:latest RUN mkdir -p /webapp COPY . /webapp WORKDIR /webapp RUN [, ] RUN sudo apt-get -y update \ && RUN curl -sSL https://github.com/libuv/libuv/archive/v1.8.0.tar.gz | sudo tar zxfv - -C /usr/local/src \ && cd /usr/local/src/libuv-1.8.0 \ && && sudo ./configure \ && && && && cd ~/ \ && sudo ldconfig EXPOSE 5600 ENTRYPOINT [, ]

     (2)»ùÓÚdotnet:0.0.1-alpha-onbuild

    ¡¡

    1.±¾Õ¾×ñÑ­ÐÐÒµ¹æ·¶£¬ÈκÎתÔصĸå¼þ¶¼»áÃ÷È·±ê×¢×÷ÕߺÍÀ´Ô´£»2.±¾Õ¾µÄÔ­´´ÎÄÕ£¬ÇëתÔØʱÎñ±Ø×¢Ã÷ÎÄÕÂ×÷ÕߺÍÀ´Ô´£¬²»×ðÖØÔ­´´µÄÐÐΪÎÒÃǽ«×·¾¿ÔðÈΣ»3.×÷ÕßͶ¸å¿ÉÄܻᾭÎÒÃDZ༭Ð޸Ļò²¹³ä¡£

    Ïà¹ØÎÄÕÂ
    • ÈçºÎÔÚ ASP.NET Core Öз¢ËÍÓʼþ - Savorboard

      ÈçºÎÔÚ ASP.NET Core Öз¢ËÍÓʼþ - Savorboard

      2017-05-02 08:02

    • Ê®¶þ¸ö ASP.NET Core Àý×Ó - Savorboard

      Ê®¶þ¸ö ASP.NET Core Àý×Ó - Savorboard

      2017-04-27 16:01

    • ASP.NET MVC5ÇëÇó¹ÜµÀºÍÉúÃüÖÜÆÚ - Ñ©·Éºè

      ASP.NET MVC5ÇëÇó¹ÜµÀºÍÉúÃüÖÜÆÚ - Ñ©·Éºè

      2017-04-24 08:04

    • ASP.NET Core MVC Ô´Âëѧϰ£ºÏê½â Action µÄ¼¤»î - Savorboard

      ASP.NET Core MVC Ô´Âëѧϰ£ºÏê½â Action µÄ¼¤»î - Savorboard

      2017-04-14 13:04

    ÍøÓѵãÆÀ
    ¾