Docker Community Forums

Share and learn in the Docker community.

Docker root passwd Not working

I need to install some software using ansible, so must need to ssh work for ansible script run.

docker run -it -d -h test.test.mobi -v /root/nginx --name nginxagent_test ubuntu16

so i changed root passwd in my docker

root@test:/# sudo passwd root
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

after that i try to ssh the docker machine, type sam password to ssh, its not working for me.

Suggest me How to fix this, How to set root passwd