_From @syned on March 7, 2017 14:35_
dotnet --version
Dockerfile
FROM microsoft/dotnet:runtime
COPY out .
docker build -t app .
docker run -it --rm app
Publish
dotnet publish -o out -r ubuntu.16.04-x64
Error:
Failed to load /libhostpolicy.so, error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required b
y /libhostpolicy.so)
An error occurred while loading required library libhostpolicy.so from []
RuntimeIdentifiers: ubuntu.16.04-x64
_Copied from original issue: aspnet/Home#1953_
@syned, It is not clear on what the repo steps are for your issue. Can you clarify? What are the steps you are using to build your Dockerfile and run a container? At what point are you encountering the error?
The one thing I noticed in the information you included is that you are publishing your app for ubuntu.16.04-x64. The microsoft/dotnet:runtime image is based on Debian Jessie. If you want to run your app with the microsoft/dotnet:runtime image, then you will need to publish your app using debian.8-x64.
@MichaelSimons the error happens when I run the container. I will try with debian.8-x64.
@MichaelSimons I've updated everything to the latest version and removed runtimes at all and everything is working fine. Thank you for helping me!
@syned - Glad to hear everything is working for you! Closing issue.
@syned Can you please provide more details on the same.?? I am also getting the same issue. using microsoft/dotnet:1.1.2-runtime as base image for Docker, and when i run the image, i get this error while starting the application.
Failed to load /abc/libhostpolicy.so, error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /abc/libhostpolicy.so)
An error occurred while loading required library libhostpolicy.so from [/abc]
Most helpful comment
@MichaelSimons I've updated everything to the latest version and removed runtimes at all and everything is working fine. Thank you for helping me!