这里在登录docker 容器时,遇到了权限不足。解决办法时切换成root 身份登录

jenkins@3ec4412484f8:/$ su - root
su: must be run from a terminal
jenkins@3ec4412484f8:/$ cd /root
bash: cd: /root: Permission denied
jenkins@3ec4412484f8:/$ su -
su: must be run from a terminal
jenkins@3ec4412484f8:/$ su - root
su: must be run from a terminal
jenkins@3ec4412484f8:/$ sudo su - root
bash: sudo: command not found
jenkins@3ec4412484f8:/$ exit
exit
root@ubuntu:~# docker exec -u root -it myjenkins /bin/bash
root@3ec4412484f8:/# ls
bin   dev               etc   lib    media  opt   root  sbin  sys  usr
boot  docker-java-home  home  lib64  mnt    proc  run   srv   tmp  var
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐