I am trying to create an image of my 4-project ASP.NET 5 solution. 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 have a simple Docker file that 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 is global.json, or in the folder of my web application, where is my project.json? Of course, I changed it depending on where this file is located.
In any case, both work because they load all the libraries I need when I run the command
docker build -t quizzcorrector.
My problem is the moment the docker tells me
Could not find Models> = 1.0.0
Could not find FlashTools> = 1.0.0
Could not find QuizzService> = 1.0.0
I saw in this thread https://github.com/aspnet/aspnet-docker/issues/19 that in a multi-project solution, we have to run the "kpm pack" command to pack my application in a deployable and manageable form.
I could not find any Dockerfiles examples with the kpm pack command, only the documentation: https://github.com/aspnet/Home/wiki/Package-Manager
I also, of course, tried to use the ADD or COPY commands in my Docker file to copy the contents of my projects to the container file system, but still the same error.
Thank you for helping me.
docker asp.net-core
JΓ©rΓ΄me mevel
source share