Using admin/non-admin operations at runtime in Windows servercore container

I am using Windows servercore container that has ContainerAdministrator and ContainerUser users.

At build-time, its easy to switch between the two users with USER user

However, at runtime. I also require to run operations with both elevated and non-elevated operations. I tried searching around but couldn’t find a way to do this. (Both starting as ContainerAdministrator and as ContainerUser)

Source: Docker Questions

LEAVE A COMMENT