1.docker images 列出本地主机上所有镜像
字段依次代表:镜像源,镜像版本,镜像id,镜像创建时间,镜像大小
[root@ipha-dev71-1 chenjl]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 12306_ticket latest ddc31ea56cd9 10 hours ago 1.84GB <none> <none> d5857c982bb6 2 days ago 924MB hello-world latest fce289e99eb9 8 months ago 1.84kB training/webapp latest 6fae60ef3446 4 years ago 349MB
举例:使用版本为14.04的ubuntu系统镜像来运行容器,命令如下
[root@ipha-dev71-1 chenjl]# docker run -t -i ubuntu:14.04 /bin/bash # -t是指定版本,-i是进入交互模式 root@f24c1984b49a:/#