Docker run interactive not bringing root

hello can someone kindly guide me why i am unable to get the root prompt in WIndows powershell post the command “docker run -it ubuntu”. I am new to docker and ubuntu hence i am unable to progress with other video tutorials on docker from Mosh.

i have successfully installed using “docker run ubuntu” command which will check and pull the docker

docker ps -a ( i can see the ubuntu with “bash” . thanks

What do you see with “docker run -it ubuntu”?

Isn’t it just how it should be ?
When you start Linux you don’t have root access by default.
Some images attach on root by default but this depends on how they were prepared.

I never had such need so I don’t know myself but I found something that should be of interest for you.

Running as root on Docker images that don’t use root



above image i what i see post docker run -it ubuntu command and the next line cursor doenst allow we to key in anything…

while the below image is from Moshs video which shows the power shell root with its nomenclature… and beyond the cursor in red allows developers to key in commands)

while, Mosh’s video on the post the same command he sees a powershell command with its nomenclature and followed by a cursor where he writes commands in interactive mode

many thanks for reference URL and will check out the material if i can resolve it…