简体   繁体   中英

Windows Server 2016 docker image default username/password

是否有基本microsoft / windowsservercore映像使用的默认用户/密码?

I faced the same problem when i used microsoft/iis image. You are able to connect trough IIS Manager, but you are forced to enter a password because "empty" is not valid. so what i did with both docker images was the following: i added an admin user

RUN NET USER testing "Password01!" /ADD
RUN NET LOCALGROUP "Administrators" "testing" /ADD

hope that helps you, using this method for many docker images

You can login into running container with Enter-PSSession with -RunAsAdministrator command and then create user and add to administrator's group via get-command -module Microsoft.Powershell.localaccounts I put it in start up script of container and read those off values passed as environment variables which are used to start a container. This way you don't need to hardcode those values into image.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM