-->

Windows containers 2016 run powershell as a domain

2020-07-15 02:46发布

问题:

I want to be able to either run a Windows Container as a domain user

Example (no idea on how to run as a different user)

docker run -it microsoft/nanoserver powershell

Or alternatively being able to run powershell script in the container as a domain user. I would have to pass in -e to docker run .. but that is ok.

The reason for this is to run something like (but the application uses domain resources like SQL and file shares)

dotnet app.dll

回答1:

the answer to your question eventually found it's way to the container docs and is brand new. please refer to this link until it will be published in the MSDN container site.

https://github.com/Microsoft/Virtualization-Documentation/blob/live/virtualization/windowscontainers/manage-containers/manage-serviceaccounts.md

----edit:---
and live link has moved again:
https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/manage-serviceaccounts