Fahad
Fahad

Reputation: 878

ASP.NET Core 1.0 RC1 Docker with dnu publish

I have published an asp.net vnext application using,

dnu publish --runtime 1.0.0-rc1-update1 --framework dnxcore50 --no-source

after this If I generate a docker container,

FROM microsoft/aspnet:1.0.0-rc1-update1-coreclr

ADD ./bin/output/approot /app WORKDIR /app

EXPOSE 8080 ENTRYPOINT ["./web1"]

If I run this using "docker run" command, then I see there is a problem with System.Net.Security. I also read some related issues with deploying to Linux, + some blogs which instruct on how to do "dnu publish" with linux runtime in a LINUX OS (ex: Ubuntu).

If I have to build in a LINUX OS to target LINUX, then that beats the purpose of cross-platform. In some blogs I also read, just by doing dnu restore from the source it will be good enough, problem is I have a complicated source folder setup, and I don't want to write long build scripts for Dockerfile that will help me copy all the required source + dependent source projects, and then create a DNX image of the app (very tedious).

Does anyone have a simple solution for this?

Upvotes: 0

Views: 156

Answers (1)

Fahad
Fahad

Reputation: 878

I found the issue was with the nuget packaging for System.Net.Security package. https://www.nuget.org/packages/System.Net.Security/4.0.0-beta-23516

This version doesn't include the package for dnxcore50, but the one previous to that has it defined,

https://www.nuget.org/packages/System.Net.Security/4.0.0-beta-23409

Downgraded to use this and this issue is solved. Doh! silly issues by the MS team.

Upvotes: 0

Related Questions