docker 笔记(3) -- 容器

[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED] [HTML_REMOVED]面壁者,我是你的破壁人[HTML_REMOVED][HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED]参考[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED]菜鸟教程 -- docker[HTML_REMOVED][HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED]额[HTML_REMOVED] [HTML_REMOVED]容器可以看成是虚拟机软件,是用来运行镜像的[HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED]Docker 客户端[HTML_REMOVED] [HTML_REMOVED]docker 客户端既是在 bash 下使用 docker 相关的命令,比如之前所记录的 [HTML_REMOVED]docker images[HTML_REMOVED] 等命令,直接键入 docker 能够看到所有命令,可以通过命令 [HTML_REMOVED]docker command --help[HTML_REMOVED] 更深入的了解[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED][HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED][HTML_REMOVED] [HTML_REMOVED] [HTML_REMOVED]查看正在运行的容器[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED][HTML_REMOVED][HTML_REMOVED]root@pinsily:~# docker ps [HTML_REMOVED][HTML_REMOVED]

[HTML_REMOVED] [HTML_REMOVED]查看网络端口[HTML_REMOVED] [HTML_REMOVED]容器和主机之间会有一个端口映射实现网络连接[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED][HTML_REMOVED][HTML_REMOVED]root@pinsily:~# docker port ID [HTML_REMOVED][HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED] [HTML_REMOVED]创建容器[HTML_REMOVED] [HTML_REMOVED]直接镜像的程序[HTML_REMOVED] [HTML_REMOVED][HTML_REMOVED][HTML_REMOVED][HTML_REMOVED]root@pinsily:~# docker run ubuntu:14.04 /bin/echo [HTML_REMOVED]Hello world[HTML_REMOVED] Hello world [HTML_REMOVED][HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED]

[HTML_REMOVED] [HTML_REMOVED]总结[HTML_REMOVED] [HTML_REMOVED]容器的基本使用就记录这些常用的了,留当一个学习的记录,之后如果有具体应用的话在再接再厉,可能会用到 python,Nginx 这些网络和编程软件安装的可能[HTML_REMOVED] [HTML_REMOVED]