【发布时间】:2020-07-13 20:00:34
【问题描述】:
当我想使用 root 帐户安装一些工具时,来自 Docker hub 的 kubesphere/elasticsearch-oss:6.7.0-1 映像需要提供 root 帐户的密码。如何获取或更改其密码?
sh-4.2$ su root
Password:
su: Authentication failure
【问题讨论】:
-
制作自己的图像。不要在运行时执行此操作,您的更改将在您重新创建容器时丢失。容器不是虚拟机。
-
我想你可以参考这篇文章Exec commands on kubernetes pods with root access在K8s中以root身份执行
标签: docker