I'm trying to create an image of my ASP.NET 5 solution which is composed of 4 projects. Here is the structure:
- FlashTools (ASP.NET 5 class library)
- Models (ASP.NET 5 class library)
- QuizzCorrector (ASP.NET 5 Web Application)
- QuizzService (ASP.NET 5 class library)
I've a simple Dockerfile which looks like this:
FROM microsoft/aspnet
COPY . /app
WORKDIR /app
RUN ["kpm", "restore"]
EXPOSE 5004
ENTRYPOINT ["k", "kestrel"]
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.
Anyway both seems to work because it download all the libraries I need when I run the command
docker build -t quizzcorrector .
My problem is at a moment docker tells me
Unable to locate Models >= 1.0.0
Unable to locate FlashTools >= 1.0.0
Unable to locate QuizzService >= 1.0.0
I've seen on this thread https://github.com/aspnet/aspnet-docker/issues/19 that in a multi-projects solution we should run the command "kpm pack" to pack my app into a deployable and runnable form.
I could not find any examples of Dockerfiles with the kpm pack command, only the documentation: https://github.com/aspnet/Home/wiki/Package-Manager
I've also tried of course to use ADD or COPY commands in my Dockerfile to copy the contents of my projects into the filesystem of the container, but still the same error.
Thank's for helping me