linux mint运行docker
1,sudo apt-get install docker.io
或者sudo apt-get install docker*
2,安装好之后
sudo docker -d 启动进程提示:
yimiyan@mint ~ $ sudo docker -d
2015/05/19 22:25:43 docker daemon: 1.0.1 990021a; execdriver: native; graphdriver:
[415a4572] +job initserver()
[415a4572.initserver()] Creating server
[415a4572] +job init_networkdriver()
[415a4572] +job serveapi(unix:///var/run/docker.sock)
2015/05/19 22:25:43 Listening for HTTP on unix (/var/run/docker.sock)
[415a4572] -job init_networkdriver() = OK (0)
2015/05/19 22:25:43 WARNING: Your kernel does not support cgroup swap limit.
Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
[415a4572] -job initserver() = ERR (1)
2015/05/19 22:25:43 Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
执行: sudo apt-get install apparmor
执行完成之后,后台启动docker进程: sudo docker -d &
3,执行:sudo docker run -t -i index.alauda.cn/alauda/ubuntu /bin/bash
yimiyan@mint ~ $ sudo docker run -t -i index.alauda.cn/alauda/ubuntu /bin/bash
Unable to find image ‘index.alauda.cn/alauda/ubuntu‘ locally
Pulling repository index.alauda.cn/alauda/ubuntu
ae983d5e88ce: Download complete
511136ea3c5a: Download complete
53f858aaaf03: Download complete
837339b91538: Download complete
615c102e2290: Download complete
b39b81afc8ca: Download complete
92a05e689124: Download complete
a5ec8ea8f4d9: Download complete
c1d5c21f8a78: Download complete
d37760e835dc: Download complete
c4dd97affb83: Download complete
673f1fe20a3a: Download complete
77421a5e2b9c: Download complete
de1f78ad6493: Download complete
root@ffd019220845:/#
ps:
1)index.alauda.cn/alauda/ubuntu 为云雀的ubuntu镜像库地址。
2)pulling默认版本
3)run的时候自动pulling
4,查看当前系统中的镜像
yimiyan@mint ~ $ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest 07f8e8c5e660 2 weeks ago 188.3 MB
busybox ubuntu-14.04 32e97f5f5d6b 4 weeks ago 5.609 MB
busybox ubuntu-12.04 faf804f0e07b 4 weeks ago 5.455 MB
busybox buildroot-2014.02 8c2e06607696 4 weeks ago 2.433 MB
busybox latest 8c2e06607696 4 weeks ago 2.433 MB
busybox buildroot-2013.08.1 3dba22db9896 4 weeks ago 2.489 MB
index.alauda.cn/alauda/ubuntu latest ae983d5e88ce 4 months ago 255.1 MB
5,在docker中运行hello world
yimiyan@mint ~ $ sudo docker run ae983d5e88ce echo " Hello world"
Hello world
或者
yimiyan@mint ~ $ sudo docker run index.alauda.cn/alauda/ubuntu echo " Hello world"
Hello world
6,进入镜像系统
yimiyan@mint ~ $ sudo docker run -t -i index.alauda.cn/alauda/ubuntu /bin/bash
root@795904074f0a:/# ls
bin dev home lib64 mnt proc run sbin srv tmp var
boot etc lib media opt root run.sh set_root_pw.sh sys usr
root@795904074f0a:/#
----------------------------------
the END.
at here ,thanks my friend for help me to learn it.
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。