The library 'libhostpolicy.so' required to execute the application was not found in '/app/'.

      win7 docker 構建鏡像並運行dotnet程序,提示缺少這個類庫。

      原因是win7以默認發佈的程序將缺少這個運行在linux的這個類庫。

解決方法:

以linux指令構建:

     dotnet publish --self-contained true --runtime linux-x64 --framework netcoreapp2.2 --output /app

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章