.netcore2 - dockerize multiple projects solutions(libraries) docker fileasp.net core 2.0 - multiple projects solution docker fileHow to symlink a file in Linux?How is Docker different from a virtual machine?How to get a Docker container's IP address from the host?How to remove old Docker containersCopying files from Docker container to hostCopying files from host to Docker containerCan't start ASP.NET Core web API Docker on a specified porthow to create image of an angular 4 app setup inside asp.net core using dockerdocker dotnet error while copying csproj fileDocker Copy Command fails

School House Points (Python + SQLite)

What is a printer console?

What is temperature on a quantum level?

Why did the Japanese attack the Aleutians at the same time as Midway?

Should you avoid redundant information after dialogue?

Why is dry soil hydrophobic? Bad gardener paradox

Optimising Table wrapping over a Select

Bob's unnecessary trip to the shops

How to check the quality of an audio sample?

If the derivative of a function is square of it then it is constant

Missing Contours in ContourPlot

TikZ Can I draw an arrow by specifying the initial point, direction, and length?

How can I deal with a player trying to insert real-world mythology into my homebrew setting?

Is this floating-point optimization allowed?

Would letting a multiclass character rebuild their character to be single-classed be game-breaking?

When did the Roman Empire fall according to contemporaries?

What would be the ideal melee weapon made of "Phase Metal"?

Cubic programming and beyond?

Supporting developers who insist on using their pet language

Did any of the founding fathers anticipate Lysander Spooner's criticism of the constitution?

How can one write good dialogue in a story without sounding wooden?

What's the point of this scene involving Flash Thompson at the airport?

What would the EU do if an EU member declared war on another EU member?

Find values of x so that the matrix is invertible



.netcore2 - dockerize multiple projects solutions(libraries) docker file


asp.net core 2.0 - multiple projects solution docker fileHow to symlink a file in Linux?How is Docker different from a virtual machine?How to get a Docker container's IP address from the host?How to remove old Docker containersCopying files from Docker container to hostCopying files from host to Docker containerCan't start ASP.NET Core web API Docker on a specified porthow to create image of an angular 4 app setup inside asp.net core using dockerdocker dotnet error while copying csproj fileDocker Copy Command fails






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am currently dockerizing a aspnetcore microservice application which has 3 services. I would like to create a dockerfile for each service and use docker-compose to run it, which already succussful implemented. However, each time I have publish the dotnet app into a folder first and then build the image separately and I like to inculde the build in the dockerfile.



I found this question which is very similar to my question asp.net core 2.0 - multiple projects solution docker file but the difference is for each service, I have reference to the core.library(which share some common files that use across different service).



The project structure is like this:



  • /root(contain .sln)

  • docker-compose


  • /auth.service



    • .csproj

    • dockerfile



  • /search.service



    • dockerfile

    • .csproj


  • /common.library

    • .csproj


Below is the dockerfile in auth.service



FROM microsoft/aspnetcore:2.0 AS base
WORKDIR /app
EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY ["auth.service.csproj", "dotnetapp/"]
COPY ["Common.library.csproj", "Common.library/"]
RUN dotnet restore "auth.service.csproj"
COPY . .
WORKDIR "/src/auth.service"
RUN dotnet build "auth.service.csproj" -c Release -o /app

FROM build AS publish
RUN dotnet publish "auth.service.csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "auth.service.dll"]


Everything is running well except the line COPY ["Common.library.csproj", "Common.library/"]. It throws error like cannot find the file which is right. The Common.library.csproj is not inside the auth.service directory.



Then I tried to re-write this to copy ../Common.library/Common.library.csproj but since we cannot copy the source outside of the current directory(docker said that), so it doesn't work.



I tried to change the properties of project dependencies of common.library from to copy local -> true, but it doesn't work.



Any help would be really appreciated!










share|improve this question




























    0















    I am currently dockerizing a aspnetcore microservice application which has 3 services. I would like to create a dockerfile for each service and use docker-compose to run it, which already succussful implemented. However, each time I have publish the dotnet app into a folder first and then build the image separately and I like to inculde the build in the dockerfile.



    I found this question which is very similar to my question asp.net core 2.0 - multiple projects solution docker file but the difference is for each service, I have reference to the core.library(which share some common files that use across different service).



    The project structure is like this:



    • /root(contain .sln)

    • docker-compose


    • /auth.service



      • .csproj

      • dockerfile



    • /search.service



      • dockerfile

      • .csproj


    • /common.library

      • .csproj


    Below is the dockerfile in auth.service



    FROM microsoft/aspnetcore:2.0 AS base
    WORKDIR /app
    EXPOSE 80

    FROM microsoft/aspnetcore-build:2.0 AS build
    WORKDIR /src
    COPY ["auth.service.csproj", "dotnetapp/"]
    COPY ["Common.library.csproj", "Common.library/"]
    RUN dotnet restore "auth.service.csproj"
    COPY . .
    WORKDIR "/src/auth.service"
    RUN dotnet build "auth.service.csproj" -c Release -o /app

    FROM build AS publish
    RUN dotnet publish "auth.service.csproj" -c Release -o /app

    FROM base AS final
    WORKDIR /app
    COPY --from=publish /app .
    ENTRYPOINT ["dotnet", "auth.service.dll"]


    Everything is running well except the line COPY ["Common.library.csproj", "Common.library/"]. It throws error like cannot find the file which is right. The Common.library.csproj is not inside the auth.service directory.



    Then I tried to re-write this to copy ../Common.library/Common.library.csproj but since we cannot copy the source outside of the current directory(docker said that), so it doesn't work.



    I tried to change the properties of project dependencies of common.library from to copy local -> true, but it doesn't work.



    Any help would be really appreciated!










    share|improve this question
























      0












      0








      0








      I am currently dockerizing a aspnetcore microservice application which has 3 services. I would like to create a dockerfile for each service and use docker-compose to run it, which already succussful implemented. However, each time I have publish the dotnet app into a folder first and then build the image separately and I like to inculde the build in the dockerfile.



      I found this question which is very similar to my question asp.net core 2.0 - multiple projects solution docker file but the difference is for each service, I have reference to the core.library(which share some common files that use across different service).



      The project structure is like this:



      • /root(contain .sln)

      • docker-compose


      • /auth.service



        • .csproj

        • dockerfile



      • /search.service



        • dockerfile

        • .csproj


      • /common.library

        • .csproj


      Below is the dockerfile in auth.service



      FROM microsoft/aspnetcore:2.0 AS base
      WORKDIR /app
      EXPOSE 80

      FROM microsoft/aspnetcore-build:2.0 AS build
      WORKDIR /src
      COPY ["auth.service.csproj", "dotnetapp/"]
      COPY ["Common.library.csproj", "Common.library/"]
      RUN dotnet restore "auth.service.csproj"
      COPY . .
      WORKDIR "/src/auth.service"
      RUN dotnet build "auth.service.csproj" -c Release -o /app

      FROM build AS publish
      RUN dotnet publish "auth.service.csproj" -c Release -o /app

      FROM base AS final
      WORKDIR /app
      COPY --from=publish /app .
      ENTRYPOINT ["dotnet", "auth.service.dll"]


      Everything is running well except the line COPY ["Common.library.csproj", "Common.library/"]. It throws error like cannot find the file which is right. The Common.library.csproj is not inside the auth.service directory.



      Then I tried to re-write this to copy ../Common.library/Common.library.csproj but since we cannot copy the source outside of the current directory(docker said that), so it doesn't work.



      I tried to change the properties of project dependencies of common.library from to copy local -> true, but it doesn't work.



      Any help would be really appreciated!










      share|improve this question














      I am currently dockerizing a aspnetcore microservice application which has 3 services. I would like to create a dockerfile for each service and use docker-compose to run it, which already succussful implemented. However, each time I have publish the dotnet app into a folder first and then build the image separately and I like to inculde the build in the dockerfile.



      I found this question which is very similar to my question asp.net core 2.0 - multiple projects solution docker file but the difference is for each service, I have reference to the core.library(which share some common files that use across different service).



      The project structure is like this:



      • /root(contain .sln)

      • docker-compose


      • /auth.service



        • .csproj

        • dockerfile



      • /search.service



        • dockerfile

        • .csproj


      • /common.library

        • .csproj


      Below is the dockerfile in auth.service



      FROM microsoft/aspnetcore:2.0 AS base
      WORKDIR /app
      EXPOSE 80

      FROM microsoft/aspnetcore-build:2.0 AS build
      WORKDIR /src
      COPY ["auth.service.csproj", "dotnetapp/"]
      COPY ["Common.library.csproj", "Common.library/"]
      RUN dotnet restore "auth.service.csproj"
      COPY . .
      WORKDIR "/src/auth.service"
      RUN dotnet build "auth.service.csproj" -c Release -o /app

      FROM build AS publish
      RUN dotnet publish "auth.service.csproj" -c Release -o /app

      FROM base AS final
      WORKDIR /app
      COPY --from=publish /app .
      ENTRYPOINT ["dotnet", "auth.service.dll"]


      Everything is running well except the line COPY ["Common.library.csproj", "Common.library/"]. It throws error like cannot find the file which is right. The Common.library.csproj is not inside the auth.service directory.



      Then I tried to re-write this to copy ../Common.library/Common.library.csproj but since we cannot copy the source outside of the current directory(docker said that), so it doesn't work.



      I tried to change the properties of project dependencies of common.library from to copy local -> true, but it doesn't work.



      Any help would be really appreciated!







      linux docker .net-core docker-compose dockerfile






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 5:15









      Daniel ChoiDaniel Choi

      452 silver badges8 bronze badges




      452 silver badges8 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350272%2fnetcore2-dockerize-multiple-projects-solutionslibraries-docker-file%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55350272%2fnetcore2-dockerize-multiple-projects-solutionslibraries-docker-file%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현