I am deploying a .net core application for Docker.
My docker file is as follows, which is added in my main .net application:
FROM microsoft/dotnet:1.1-sdk-projectjson
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
ENTRYPOINT ["dotnet", "run"]
It is not possible to allow libraries of standard .net classes that are added to my main .net application.
My project structure is as follows:
Core folder
-Logging.Interfaces .net std project
-Logging.Entities .net std project
Infrastructure folder
-Infrastructure.Logging .net std project
Services folder
-Services .net std project
Web folder
-Web .net core application
The web application project.json dependency section is as follows:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Services": "1.0.0-*",
"DomainInterfaces": "1.0.0-*",
"Core.Logging.Interfaces": "1.0.0-*",
"Core.Logging.Entities": "1.0.0-*",
"Infrastructure.Logging": "1.0.0-*"
},
When I run the following command, to create the image this gives me an error:
user@machine_name MINGW64 path to solution
$ docker build -t helloWorld:core .
Unable to resolve 'Core.Logging.Interfaces (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'Core.Logging.Entities (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'Services (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'Infrastructure.Logging (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'DomainInterfaces (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Could someone please direct what is wrong here because I am completely new to Docker.