vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run centos echo “hello world”
hello world
何!? どういう事?
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run centos echo "hello world" hello world
docker psで一覧を見ることができる。
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker ps
動作が終了したものを見るのは docker ps -a
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0b8011965ea0 centos “echo ‘hello world'” 5 minutes ago Exited (0) 5 minutes ago romantic_kapitsa
c6490f99e041 hello-world “/hello” 40 minutes ago Exited (0) 40 minutes ago distracted_wilson
1abf8bdb8845 hello-world “/hello” 40 minutes ago Exited (0) 40 minutes ago sad_colden
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker run -d centos free -s 3
45e5501bd8ef3b3dd8ec4a717e992550222cb68743d78bcc4dd88db5f3673cba
vagrant@vagrant-ubuntu-trusty-64:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
45e5501bd8ef centos “free -s 3” 11 seconds ago Up 10 seconds compassionate_mccarthy
$ sudo docker logs 45e
total used free shared buff/cache available
Mem: 501708 155076 82484 416 264148 325451
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155068 82484 416 264156 325467
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155068 82484 416 264156 325467
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155060 82484 416 264164 325467
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155056 82484 416 264168 325479
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155048 82484 416 264176 325479
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155048 82484 416 264176 325487
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155040 82484 416 264184 325487
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155164 82360 416 264184 325363
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155156 82360 416 264192 325363
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155156 82360 416 264192 325363
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155148 82360 416 264200 325387
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155148 82360 416 264200 325387
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155136 82360 416 264212 325387
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155136 82360 416 264212 325387
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155128 82360 416 264220 325387
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155128 82360 416 264220 325407
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155120 82360 416 264228 325415
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155120 82360 416 264228 325415
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155112 82360 416 264236 325415
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155496 81616 416 264596 325039
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155484 81616 416 264608 325047
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155484 81616 416 264608 325047
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155476 81616 416 264616 325047
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155228 81864 416 264616 325307
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155228 81856 416 264624 325299
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155232 81852 416 264624 325295
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155172 81844 416 264692 325363
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155172 81844 416 264692 325363
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155164 81844 416 264700 325371
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155160 81844 416 264704 325371
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155152 81844 416 264712 325383
Swap: 0 0 0
total used free shared buff/cache available
Mem: 501708 155152 81844 416 264712 325383
Swap: 0 0 0
こんなのやった記憶ねーぞ