andrewabest / LocalDevIdentityServer

A basic docker-ready local-development-only Identity Server 4 implementation
MIT License
1 stars 0 forks source link

Creating docker image via ResetTheWorld fails #2

Open Stefan-Hanke opened 4 years ago

Stefan-Hanke commented 4 years ago

Coming from here and am following that tutorial now.

I've cloned the repo, and ran ResetTheWorld.bat - boom. The build container needs to be updated to use dotnet Core 3.1 also.

I'll write a MR soonish.

Stefan-Hanke commented 4 years ago

Oh well unfortunately not-so-easy. I've updated the Dockerfile to use mcr.microsoft.com/dotnet/core/sdk:3.1 as build image.

The restore seems to work fine, however the publish bails out:

/usr/share/dotnet/sdk/3.1.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1064: Package IdentityModel, version 4.1.1 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restrictions. [/app/LocalDevIdentityServer/LocalDevIdentityServer.csproj]
The command '/bin/sh -c dotnet publish -c Release -o out' returned a non-zero code: 1

I have no idea why this should not work (just building it on Windows works). I've manually verified that the package is existing in ~/.nuget/packages. The dotnet SDK is, however, newer inside the container (3.1.201, the locally being 3.1.100.

andrewabest commented 4 years ago

Howdy @Stefan-Hanke - it looks like the issue is Kestral needs a bit more information to make the HTTPS binding (I switched the sample code to HTTPS).

https://docs.microsoft.com/en-us/aspnet/core/security/docker-https?view=aspnetcore-3.1 following this should get us to a working state - I'll look to do this sometime soon.

In the mean time, the easiest way to get going is just to open up the solution in Visual Studio and F5, that way you can skip the docker part of it if you want :)