title: ASP.NET 5: docker build with multi-projects solution
body: <p>I'm trying to create an image of my ASP.NET 5 solution which is composed of 4 projects. Here is the structure:</p>
  <ul>
  <li>FlashTools (ASP.NET 5 class library)</li>
  <li>Models (ASP.NET 5 class library)</li>
  <li>QuizzCorrector (ASP.NET 5 Web Application)</li>
  <li>QuizzService (ASP.NET 5 class library)</li>
  </ul>
  <p>I've a simple Dockerfile which looks like this:</p>
  <pre><code>FROM microsoft/aspnet
  
  COPY . /app
  WORKDIR /app
  RUN [&quot;kpm&quot;, &quot;restore&quot;]
  
  EXPOSE 5004
  ENTRYPOINT [&quot;k&quot;, &quot;kestrel&quot;]
  </code></pre>
  <p>But not sure where to put it. In the root folder of my solution where a global.json is or in my Web Application folder where my project.json is?
  Of course I've modified it depending of where this file were located.</p>
  <p>Anyway both seems to work because it download all the libraries I need when I run the command</p>
  <blockquote>
  <p>docker build -t quizzcorrector .</p>
  </blockquote>
  <p>My problem is at a moment docker tells me</p>
  <blockquote>
  <p>Unable to locate Models &gt;= 1.0.0</p>
  <p>Unable to locate FlashTools &gt;= 1.0.0</p>
  <p>Unable to locate QuizzService &gt;= 1.0.0</p>
  </blockquote>
  <p>I've seen on this thread <a href="https://github.com/aspnet/aspnet-docker/issues/19" rel="noreferrer">https://github.com/aspnet/aspnet-docker/issues/19</a> that in a multi-projects solution we should run the command &quot;kpm pack&quot; to pack my app into a deployable and runnable form.</p>
  <p>I could not find any examples of Dockerfiles with the kpm pack command, only the documentation: <a href="https://github.com/aspnet/Home/wiki/Package-Manager" rel="noreferrer">https://github.com/aspnet/Home/wiki/Package-Manager</a></p>
  <p>I've also tried of course to use <strong>ADD</strong> or <strong>COPY</strong> commands in my Dockerfile to copy the contents of my projects into the filesystem of the container, but still the same error.</p>
  <p>Thank's for helping me</p>