I am running a .net application for the kernel in a docker container. Here is my docker file (only for creating dev environment):
FROM microsoft/dotnet:1.0.1-sdk-projectjson
ENV ASPNET_ENV Development
COPY bin/Debug/netcoreapp1.0/publish/ /root/
EXPOSE 5000/tcp
ENTRYPOINT dotnet /root/AVP.WebApi.dll
I have an appSettings.Development.json file in the / publish / folder. If I create and run this Docker file, I will have a strange problem when the .NET application cannot find the necessary application settings (they are in the appSettings.Development.json file).
I confirmed that from the command prompt on Windows, if I run dotnet publish / AVP.WebAPI.dll, the application throws the same exceptions for missing configuration settings. However, if I connect to / publish and run dotnet AVP.WebAPI.dll, the application starts and works fine.
Any ideas on how to modify the docker file so that it launches the application correctly using appSettings.Development.json values? (I also tried to run the application with all the values copied to the regular appSettings.json files with no luck)
I also tried running the COPY command in / instead of / root and making dotnet AVP.WebApi.dll as an entry point, but this leads to the fact that the project cannot find the dependencies.
source
share