どうすれば login to container as root ?
thufir@dur:~$
thufir@dur:~$ Sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu latest 20c44cd7596f 2 days ago 123MB
hello-world latest 725dcfab7d63 2 weeks ago 1.84kB
jmar71n/freepbx latest 8dda2a58fde1 19 months ago 1.54GB
thufir@dur:~$
thufir@dur:~$ Sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a2e7e9f60643 hello-world "bash" 2 minutes ago Created laughing_knuth
b616192b64f4 ubuntu "bash" 5 minutes ago Exited (0) 5 minutes ago nifty_kowalevski
28237032f2d3 jmar71n/freepbx "/sbin/my_init" 24 minutes ago Up 24 minutes wonderful_wilson
54c683990ccc jmar71n/freepbx "/sbin/my_init" 26 minutes ago Up 26 minutes modest_yalow
a91a6dcb8436 jmar71n/freepbx "/sbin/my_init" 2 hours ago Up 2 hours gallant_noether
ac53b46b768e ubuntu "bash" 24 hours ago Exited (0) 24 hours ago mystifying_murdock
b59af1daa216 hello-world "/hello" 24 hours ago Exited (0) 24 hours ago flamboyant_curie
thufir@dur:~$
thufir@dur:~$ Sudo docker exec -u 0 -it jmar71n/freepbx bash
Error: No such container: jmar71n/freepbx
thufir@dur:~$
thufir@dur:~$ Sudo docker exec -u 0 -it 8dda2a58fde1 bash
Error: No such container: 8dda2a58fde1
thufir@dur:~$
ログインをコンテナの1つに並べ替えることができます。
thufir@dur:~$
thufir@dur:~$ Sudo docker run -it ubuntu bash
root@b616192b64f4:/# exit
exit
thufir@dur:~$
thufir@dur:~$ Sudo docker run -it jar71n/freepbx bash
Unable to find image 'jar71n/freepbx:latest' locally
docker: Error response from daemon: repository jar71n/freepbx not found: does not exist or no pull access.
See 'docker run --help'.
thufir@dur:~$
ubuntu
イメージは非常に小さいように見えますが。上記のコンテナのいずれかにログインしたい。
コンテナ名のスペルが間違っているようです:
jar71n!= jmar71n