容器ID改变了,里面hosts也改变了
[root@zwf-02 ~]# docker run -it hadoop-master:v1.0 sh
sh-4.2#
sh-4.2# ll
sh: ll: command not found
sh-4.2# ls
anaconda-post.log bin dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var zwf zwf_hadoop
sh-4.2#
sh-4.2# ls /zwf
hadoop-2.7.7 hadoop-2.7.7.tar.gz jdk-8u45-linux-x64.tar.gz jdk1.8.0_45
sh-4.2#
sh-4.2# cat /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.3 6ce0273f771b
sh-4.2#
sh-4.2# exit
exit
[root@zwf-02 ~]#
[root@zwf-02 ~]#