Home  >  Q&A  >  body text

docker生成的ubuntu的root的登陆密码怎么获取呢?

容器ubuntu的密码是随机的,但是我想知道这个密码是什么还有怎么改,网上搜了很多都没有解决···求帮助

迷茫迷茫2720 days ago838

reply all(3)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-04-26 09:03:20

    Obtaining this password should be meaningless to you. You do not need to use this password to log in, and the image does not contain the sshd service, so you cannot log in through ssh. You can use docker exec -it <container_name> /bin/bash directly from the host to enter bash inside the container

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-26 09:03:20

    Looking at your Dockerfile

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-26 09:03:20

    RUN echo "root:password" | chpasswd

    reply
    0
  • Cancelreply