标签:dock UI uil 必须掌握 tar ima 映射关系 准备 gnu
1、我这边准备的系统是:
root@ubuntu:~# uname -a
Linux ubuntu 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
2、准备安装docker了
安装Docker使用apt-get命令:
$ apt-get install docker.io
3、向仓库拉取这个镜像 hello-world
docker pull hello-word
4、启动这个容器,打印出来了信息表示启动完毕。前台启动
docker run helle-world
后台启动例子:
-->启动 指定端口映射关系 外部的8080到容器的80
docker run -d -p 8080:80 hub.c.163.com/library/nginx
-->启动开放所有端口 随机的对应容器端口 可以通过docker ps 查看
docker run -d -P hub.c.163.com/library/nginx
-->基础命令,必须掌握。
docker pull
docker images
docker run
docker build
docker ps
docker exec
docker start
docker stop
docker restart
标签:dock UI uil 必须掌握 tar ima 映射关系 准备 gnu
原文地址:http://www.cnblogs.com/wangjiesheng/p/6940818.html