Docker Community Forums

Share and learn in the Docker community.

Running windows containers with current host user


How can run my windows containers with the current host user ?
For Linux we can do something like this; docker run -u $(id -u ${USER}):$(id -g ${USER})

I want when I do whoami or echo %username% in the container it displays the same user as my host.

Asking for cor containers from un image ; Windowsservercore2016lts
Docker Windows for desktop.

Thank you.