You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Incorrect docker image when generating with csproj #574
When generating a csproj project for VS 2017 RC the Dockerfile is still using microsoft/dotnet:1.1.0-sdk-projectjson. I believe this should be microsoft/dotnet:1.1.0-sdk-msbuild
Once I change this and add docker via 'Project -> Add -> Docker Solution Support' in VS 2017 RC I still cannot get the project to build with docker. Are there any additional changes required for the compose files to get this to work? Thanks
Yes I have a test project in my solution, this is the angular2 app that was generated, my docker-compose file is as follows:
`version: '2'
services:
test:
image: test
build:
context: .
dockerfile: Dockerfile'
The only change I have made to this was to set the context to . as it was complaining that the context could not be null.
Looking at the docker output I can see this:
Step 7 : RUN dotnet restore
---> Running in 660edffbead5
Restoring packages for /app/Test.csproj...
/usr/share/dotnet/sdk/1.0.0-preview3-004056/NuGet.targets(70,5): error MSB4018: The "RestoreTask" task failed unexpectedly. [/app/Test.sln]
/usr/share/dotnet/sdk/1.0.0-preview3-004056/NuGet.targets(70,5): error MSB4018: System.AggregateException: One or more errors occurred. (Unable to load the service index for source https://api.nuget.org/v3/index.json.) ---> NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://api.nuget.org/v3/index.json. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates [/app/Test.sln]
I'm fairly new to docker, this doesn't mean much to me.
Thanks for reporting this. I confirmed that the microsoft/dotnet:1.1.0-sdk-msbuild base image does work with csproj projects. So I've updated generator-aspnetcore-spa to use that when you choose .csproj. This fix is in generator-aspnetcore-spa version 0.7.4, which I'll publish to npm when the CI system finishes building it.
Service 'test' failed to build. The command 'dotnet-restore' returned a non-zero code: 1.
I don't know what's going on there, but I've not been able to reproduce it. It works correctly with generator-aspnetcore-spa version 0.7.4 as far as I can tell, so I'll close this. If you're able to supply repro steps for the Peer certificate cannot be authenticated error, please let us know (but it doesn't sound like it's got anything to do with these templates).
Activity
spboyer commentedon Jan 10, 2017
What is the error you are getting after changing to the new Dockerfile?
chriscooper87 commentedon Jan 10, 2017
When building with docker I get:
Service 'test' failed to build. The command 'dotnet-restore' returned a non-zero code: 1.
spboyer commentedon Jan 10, 2017
In the
docker-compose.ymlfile is there a test service defined and/or do you have a test project in your solution?chriscooper87 commentedon Jan 10, 2017
Yes I have a test project in my solution, this is the angular2 app that was generated, my docker-compose file is as follows:
`version: '2'
services:
test:
image: test
build:
context: .
dockerfile: Dockerfile'
The only change I have made to this was to set the context to . as it was complaining that the context could not be null.
Looking at the docker output I can see this:
Step 7 : RUN dotnet restore
---> Running in 660edffbead5
Restoring packages for /app/Test.csproj...
/usr/share/dotnet/sdk/1.0.0-preview3-004056/NuGet.targets(70,5): error MSB4018: The "RestoreTask" task failed unexpectedly. [/app/Test.sln]
/usr/share/dotnet/sdk/1.0.0-preview3-004056/NuGet.targets(70,5): error MSB4018: System.AggregateException: One or more errors occurred. (Unable to load the service index for source https://api.nuget.org/v3/index.json.) ---> NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://api.nuget.org/v3/index.json. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates [/app/Test.sln]
I'm fairly new to docker, this doesn't mean much to me.
SteveSandersonMS commentedon Jan 16, 2017
Thanks for reporting this. I confirmed that the
microsoft/dotnet:1.1.0-sdk-msbuildbase image does work with csproj projects. So I've updatedgenerator-aspnetcore-spato use that when you choose .csproj. This fix is ingenerator-aspnetcore-spaversion 0.7.4, which I'll publish to npm when the CI system finishes building it.I don't know what's going on there, but I've not been able to reproduce it. It works correctly with
generator-aspnetcore-spaversion 0.7.4 as far as I can tell, so I'll close this. If you're able to supply repro steps for thePeer certificate cannot be authenticatederror, please let us know (but it doesn't sound like it's got anything to do with these templates).