SqlClient hangs when loading in Docker
A simple client is create to talk to a remote Sql database - this works in all cases on Linux) A docker image is created based on aspnet/1.0.0-rc1-update1 but with 1.0.0-rc2-16595 installed A docker image is created based on the above with the test client inside it. DNX_TRACE=1 is enabled in the container
When run, all is well until the runtime tries to load the SqlClient. The process then hangs indefinitely requiring it to be killed as in below image.
Is this known and/or is there a workaround - can anyone suggest more diagnostics ? - thanks in advance....

I've tried this on : 1.0.0-rc2-16357, 1.0.0-rc2-16551, 1.0.0-rc2-16595 and the result is the same
Docker file for runtime base is created like this
FROM microsoft/aspnet:1.0.0-rc1-update1-coreclr
ENV DNX_TRACE 1
RUN bash -c "source $DNX_USER_HOME/dnvm/dnvm.sh \
&& dnvm install 1.0.0-rc2-16595 -alias default -u -r coreclr \
&& dnvm alias default | xargs -i ln -s $DNX_USER_HOME/runtimes/{} $DNX_USER_HOME/runtimes/default"
Docker file for test client is create like this (FROM refers to the above)
FROM coreclr:1.0.0-rc2-16595
COPY "./approot" "/approot"
WORKDIR /approot
EXPOSE 5004
ENTRYPOINT ["./run"]
UPDATE
If I additionally add the below to the project.json - it works as expected - hardly ideal though....
"runtime.unix.System.Data.SqlClient": "4.0.0-rc2-23623",
"runtime.unix.System.Net.Security": "4.0.0-rc2-23623",
I found that I also needed to install libcurl4-gnutls-dev as a base image dependency to get past a "System.Net.Http.Native" DllNotFound exception.
I suspect this will all be worked through when there's an official release made
cc @ericstj Any ideas as to why the runtime package needed to be explicitly referenced in this case? Any steps on how to debug this issue?
Sounds to me like to original project was missing a reference to the lineup package. Can you share the project.lock.json from the app that was failing before the workaround?
Thanks for the response - I know you are terribly busy at the moment !
Process on Linux
- dnu restore
- dnu publish
- docker build...
- docker run -it ....
using : Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc2-16357
This works on Linux (sans Docker) just not in Docker. Might be the image I'm using but I can't take this further on my own as I don't have any more information to work on.
In the attached zip file - please find included 4 files the project.json and project.lock.json both the "with" and "without" explicit dependencies.
Thanks again James
moving this bug to the RTM milestone
Using DNU with the latest packages will not work, full stop. You need to switch to using http://github.com/dotnet/cli. Feel free to reopen if you hit a similar problem using CLI.