ContentRootPath of hosting environment in Docker

Hi All,

I am creating an ASP Core web Application with Linux docker enabled. I need to get the proper ContentRootPath from the hosting environment to process this further.

In normal ASP Web Application, the local path is returned as “D:\Sample\WebApplication1” whereas in Linux, it is returned as “/app”.

For this reason , I tried to change the working directory directly in application docker file but it doesn’t work. I have also tried to change the working directory directly in command prompt using the below command

“docker run -w /D:/sample/webapplication1/ -i -t linux pwd”

But this throws an error " Error response from daemon: pull access denied for linux, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied."

I have also tried login with port number in command prompt but it throws error like Error response from daemon: Get http://localhost:32788/v2/: EOF but the port is running in chrome.

Can anyone please suggest on how to modify the working directory of Docker and get the exact local path in Linux Docker application?

Regards,
Keerthana,

Hi Team,

Can we get any update on the above query to modify the working directory?

Regards,
Keerthana.