root@docker_01 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 6 weeks ago 601.9 MB
hub.c.163.com/public/centos 7.0 2ce04a284fa8 9 months ago 287.9 MB
hub.c.163.com/public/centos latest 997f0ed97903 13 months ago 441.8 MB
[root@docker_01 ~]# docker run --name ceshi -it centos
Unable to find image 'centos:latest' locally
Trying to pull repository docker.io/library/centos ...
。。。这是为何? 我按照下面的方法进入。。。
[root@docker_01 ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
98a498cff145 hub.c.163.com/public/centos:6.7-tools "/usr/bin/supervisord" 3 minutes ago Up 3 minutes 22/tcp ceshi_2
[root@docker_01 ~]# sh d.sh 98a498cff145
3396
[root@98a498cff145 ~]# ls
anaconda-ks.cfg d.sh new.file
[root@98a498cff145 ~]# exit
logout
[root@docker_01 ~]# ls
anaconda-ks.cfg d.sh new.file
[root@docker_01 ~]# cat d.sh
#!/bin/bash
PID=$(docker inspect --format "{{.State.Pid}}" $1)
echo $PID
nsenter -t $PID -u -i -n -p
为什么物理系统和容器里面的文件都是一样的?。。。。
Repository 아래에 centos라는 이미지가 없습니다. 대신, Hub.c.163.com/public/centos라고 합니다. 그래서 그는 최신 버전의 centos를 가져올 것입니다
으아악