상세 컨텐츠

본문 제목

Docker Day3. Docker 명령어 정리

Cloud/Docker

by 리카르돌 2018. 8. 8. 12:22

본문

# 컨테이너 리스트

[root@docker101 ~]# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES



[root@docker101 ~]# docker images ls

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
[root@docker101 ~]# docker images
REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
duetys/ubuntu                          v1                  e7453f51ba2f        20 hours ago        83.5MB
busybox                                latest              e1ddd7948a1c        6 days ago          1.16MB
httpd                                  latest              11426a19f1a2        6 days ago          178MB
ubuntu                                 latest              735f80812f90        11 days ago         83.5MB
ubuntu                                 14.04               971bb384a50a        3 weeks ago         188MB
debian                                 latest              3bbb526d2608        3 weeks ago         101MB
station.example.com:5000/hello-world   docker101.v1        2cb0d9787c4d        3 weeks ago         1.85kB
station.example.com:5000/hello-world   latest              2cb0d9787c4d        3 weeks ago         1.85kB
registry                               2.5 



[root@docker101 ~]# docker pull busybox
Using default tag: latest
latest: Pulling from library/busybox
Digest: sha256:cb63aa0641a885f54de20f61d152187419e8f6b159ed11a251a09d115fdff9bd
Status: Image is up to date for busybox:latest


busybox 이미지의 레이어 구성 확인

[root@docker101 ~]# docker history busybox

IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
e1ddd7948a1c        6 days ago          /bin/sh -c #(nop)  CMD ["sh"]                   0B                 
<missing>           6 days ago          /bin/sh -c #(nop) ADD file:96fda64a6b725d4df…   1.16MB          


[root@docker101 ~]# docker history --no-trunc=true busybox

IMAGE                                                                     CREATED             CREATED BY                                                                                          SIZE                COMMENT
sha256:e1ddd7948a1c31709a23cc5b7dfe96e55fc364f90e1cebcde0773a1b5a30dcda   6 days ago          /bin/sh -c #(nop)  CMD ["sh"]                                                                       0B                 
<missing>                                                                 6 days ago          /bin/sh -c #(nop) ADD file:96fda64a6b725d4df5249c12e32245e2f02469ff637c38077740f4984cd883dd in /    1.16MB             


컨테이터 구조 확인

[root@docker101 ~]# docker run -it busybox [root@docker101 ~]# docker inspect a4e3054b4104

[
    {
        "Id": "a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608",
        "Created": "2018-08-07T15:46:42.177848764Z",
        "Path": "sh",
        "Args": [],
        "State": {                        <- 상태정보
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-08-07T15:46:42.721016015Z",
            "FinishedAt": "2018-08-07T15:46:49.543630093Z"
        },
        "Image": "sha256:e1ddd7948a1c31709a23cc5b7dfe96e55fc364f90e1cebcde0773a1b5a30dcda",

        "ResolvConfPath": "/var/lib/docker/containers/a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608/resolv.conf",

        "HostnamePath": "/var/lib/docker/containers/a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608/hostname",
        "HostsPath": "/var/lib/docker/containers/a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608/hosts",


        "LogPath": "/var/lib/docker/containers/a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608/a4e3054b41042a588a62c1b19228e302a5ff5fc793279a3c34e0c1c912ffb608-json.log",    <-       로그정보 확인 가능


        "Name": "/sad_aryabhata",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": null,
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,   <- shared memory size
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],


            아래는 자원 사용량 제한할 수 있음

            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,


            패스설정 확인

            "MaskedPaths": [
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/asound",
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/cd7c666335f54ebf6e4ba7fbd1e7d5eca06e76dc0d5e2a374a69e6b0aedb5b9c-init/diff:/var/lib/docker/overlay2/d66c275181c2d3b268dea4bc3a6f9bb813560900210be3490243780255336694/diff",
                "MergedDir": "/var/lib/docker/overlay2/cd7c666335f54ebf6e4ba7fbd1e7d5eca06e76dc0d5e2a374a69e6b0aedb5b9c/merged",
                "UpperDir": "/var/lib/docker/overlay2/cd7c666335f54ebf6e4ba7fbd1e7d5eca06e76dc0d5e2a374a69e6b0aedb5b9c/diff",
                "WorkDir": "/var/lib/docker/overlay2/cd7c666335f54ebf6e4ba7fbd1e7d5eca06e76dc0d5e2a374a69e6b0aedb5b9c/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [],


        호스트정보

        "Config": {
            "Hostname": "a4e3054b4104",
            "Domainname": "",
            "User": "",
            "AttachStdin": true,
            "AttachStdout": true,
            "AttachStderr": true,
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": true,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [    
                "sh"    컨테이너 내부의 커멘드 정보 확인
            ],
            "ArgsEscaped": true,
            "Image": "busybox",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {}
        },



        네트워크 설정 정보

        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "92cc76439cb7487dfc174b8f0f0e9992b33da90de4376fd6f8e879cd406ff23d",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/92cc76439cb7",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "57d3e396b66ca705e1364fad465816fb5d1f8ce627cc12c749f7000be31a9d17",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]
 



단일 레이어로 export 후 import 테스트

[root@docker101 ~]# docker export a4e3054b4104 > /tmp/mybusybox.tar
[root@docker101 ~]# ls -l /tmp/mybusybox.tar
-rw-r--r--. 1 root root 1383936 Aug  8 01:00 /tmp/mybusybox.tar

[root@docker101 ~]# docker import /tmp/mybusybox.tar yslee:v0808
sha256:ec2e7a882d264e254007e91f891b3f9fef9949b0b1cba64ed3c1487482a1f5d7


[root@docker101 ~]# docker images
REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
yslee                                  v0808               ec2e7a882d26        7 seconds ago       1.16MB


# 인터렉티브모드, 컨테이너 백그라운드 재시작

[root@docker101 ~]# docker run -it ubuntu:latest /bin/bash


root@16e00dd6ff18:/# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 16:03 pts/0    00:00:00 /bin/bash
root        12     1  0 16:03 pts/0    00:00:00 ps -ef
root@16e00dd6ff18:/# exit
exit


[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES


[root@docker101 ~]#

[root@docker101 ~]# docker ps -a
CONTAINER ID        IMAGE                                  COMMAND                  CREATED              STATUS                          PORTS               NAMES
16e00dd6ff18        ubuntu:latest                          "/bin/bash"              About a minute ago   Exited (0) About a minute ago                       nifty_noyce


[root@docker101 ~]# docker start 16e00dd6ff18
16e00dd6ff18


[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS              PORTS               NAMES
16e00dd6ff18        ubuntu:latest       "/bin/bash"         About a minute ago   Up 6 seconds                            nifty_noyce


[root@docker101 ~]# docker attach nifty_noyc

root@16e00dd6ff18:/# ls
bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var


# 컨테이너 stop

[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
16e00dd6ff18        ubuntu:latest       "/bin/bash"         4 minutes ago       Up 5 seconds                            nifty_noyce
[root@docker101 ~]# docker stop 16e00dd6ff18
16e00dd6ff18
[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES



# 컨테이너 daemon mode 재기동


[root@docker101 html]# cd /var/www/html

[root@docker101 html]# echo "HP Education" > /var/www/html/index.html


[root@docker101 ~]# docker run -d -p 80:80 --name=web --restart="on-failure:5" \
> -w /var/www/html -v /var/www/html:/usr/local/apache2/htdocs httpd


90288a0ca2f4212f3a6be52a0ed508a23c0e8e7678f96065181c1e0f1b09654b


[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
90288a0ca2f4        httpd               "httpd-foreground"   3 seconds ago       Up 2 seconds        0.0.0.0:80->80/tcp   web


[root@docker101 html]# curl http://172.17.0.2/index.html
HP Education
[root@docker101 html]# curl http://localhost
HP Education



host port 8080,  컨테이너 port 80

[root@docker101 html]# docker run -d -p 8080:80 --name=web1 --restart="on-failure:5" -w /var/www/html -v /var/www/html:/usr/local/apache2/htdocs httpd

32e19395d72b519fe1d126107e7681b0ded603362d299cc5e34e672620f81829

[root@docker101 html]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                  NAMES
32e19395d72b        httpd               "httpd-foreground"   6 seconds ago       Up 4 seconds        0.0.0.0:8080->80/tcp   web1
90288a0ca2f4        httpd               "httpd-foreground"   11 minutes ago      Up 11 minutes       0.0.0.0:80->80/tcp     web


[root@docker101 html]# curl http://localhost:8080
HP Education
Hello



# 컨테이너 일시 중지, 재시작 (clustering 환경에서 특정 노드 일시 중지)

[root@docker101 html]# docker pause web1
web1
[root@docker101 html]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS                  PORTS                  NAMES
32e19395d72b        httpd               "httpd-foreground"   4 minutes ago       Up 4 minutes (Paused)   0.0.0.0:8080->80/tcp   web1
90288a0ca2f4        httpd               "httpd-foreground"   15 minutes ago      Up 15 minutes           0.0.0.0:80->80/tcp     web
[root@docker101 html]# curl http://localhost:8080
^C


[root@docker101 html]# docker unpause web1
web1


[root@docker101 html]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                  NAMES
32e19395d72b        httpd               "httpd-foreground"   4 minutes ago       Up 4 minutes        0.0.0.0:8080->80/tcp   web1
90288a0ca2f4        httpd               "httpd-foreground"   15 minutes ago      Up 15 minutes       0.0.0.0:80->80/tcp     web
[root@docker101 html]# curl http://localhost:8080
HP Education
Hello


# 동작중인 컨테이너 삭제 (메모리에서 컨테이너를 제거)

[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                  NAMES
32e19395d72b        httpd               "httpd-foreground"   9 minutes ago       Up 9 minutes        0.0.0.0:8080->80/tcp   web1
90288a0ca2f4        httpd               "httpd-foreground"   20 minutes ago      Up 20 minutes       0.0.0.0:80->80/tcp     web
[root@docker101 ~]# docker rm  web1
Error response from daemon: You cannot remove a running container 32e19395d72b519fe1d126107e7681b0ded603362d299cc5e34e672620f81829. Stop the container before attempting removal or force remove
[root@docker101 ~]# docker rm -f  web1
web1
[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
90288a0ca2f4        httpd               "httpd-foreground"   21 minutes ago      Up 21 minutes       0.0.0.0:80->80/tcp   web


# 도커 이미지로 저장


[root@docker101 html]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
90288a0ca2f4        httpd               "httpd-foreground"   45 minutes ago      Up 45 minutes       0.0.0.0:80->80/tcp   web


[root@docker101 html]# docker commit web webserver:v1
sha256:da5abb3ac3d357fdca71bfe1e923cab0fc5ed9dcc343aa6112e2597a30536d0d


[root@docker101 html]# docker images
REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
webserver                              v1                  da5abb3ac3d3        12 seconds ago      178MB



# Tag link 생성

[root@docker101 html]# docker tag debian:latest devian:v1
[root@docker101 html]# docker images
REPOSITORY                             TAG                 IMAGE ID            CREATED              SIZE
webserver                              v1                  da5abb3ac3d3        About a minute ago   178M
devian                                 v1                  3bbb526d2608        3 weeks ago          101MB
debian                                 latest              3bbb526d2608        3 weeks ago          101MB



# 호스트와 격리된 container의 격리 해제


- host PID 를 사용하여 컨테이너 시작

[root@docker101 ~]# docker run -it --pid=host ubuntu
root@d86a19e21469:/# ps 
  PID TTY          TIME CMD
12581 pts/0    00:00:00 bash
14846 pts/0    00:00:00 bash
14889 pts/0    00:00:00 ps

[root@docker101 ~]# ps -ef | grep 12581
root     12581 12578  0 01:06 pts/0    00:00:00 -bash
root     14890 12581  0 02:14 pts/0    00:00:00 ps -ef



-- host에서 컨테이너의 프로세스 ID 확인

[root@docker101 ~]# docker inspect 7ebe136199ba | grep Pid
            "Pid": 14347,

[root@docker101 ~]# ps -ef | grep 14347
root     14347 14332  0 02:09 pts/0    00:00:00 sh
root     14485 12581  0 02:10 pts/0    00:00:00 grep --color=auto 14347


-- 격리된 컨테이너에서 호스트의 네임스페이스 사용 (hostname )
[root@docker101 ~]# docker run -it ubuntu
root@8ed1084f0289:/# hostname
8ed1084f0289

[root@docker101 ~]# docker run -it --uts=host ubuntu
root@docker101:/# hostname
docker101.example.com


# runtime mode


-- background mode로 실행

[root@docker101 ~]# docker run -d ubuntu /bin/sh -c "while true; do date; done; sleep 2; done"
e4e9033fa62fba4a7e313842914d8360f0d03daa3282f9426f154bb9d23c3449



[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                NAMES
e4e9033fa62f        ubuntu              "/bin/sh -c 'while t…"   23 seconds ago      Up 21 seconds                            keen_poincare
90288a0ca2f4        httpd               "httpd-foreground"       About an hour ago   Up About an hour    0.0.0.0:80->80/tcp   web


[root@docker101 ~]# docker logs e4e9033fa62f
Tue Aug  7 17:16:49 UTC 2018
Tue Aug  7 17:16:49 UTC 2018
Tue Aug  7 17:16:49 UTC 2018
.....




[root@docker101 ~]# docker run -itd ubuntu
cb2f5321460d32613d312bb373ed714c91e1e5a5b717244a536e633cfc5ea28c
[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
cb2f5321460d        ubuntu              "/bin/bash"          2 seconds ago       Up 1 second                              condescending_jackson
90288a0ca2f4        httpd               "httpd-foreground"   About an hour ago   Up About an hour    0.0.0.0:80->80/tcp   web
[root@docker101 ~]# docker attach cb2f5321460d


[root@docker101 ~]# docker start -aid 8ed1084f0289

ctl p q 입력

root@8ed1084f0289:/# read escape sequence
[root@docker101 ~]#


# 컨테이너 이미지를 인터렉티브하게 실행


[root@docker101 ~]# docker run -it fedora /bin/bash
Unable to find image 'fedora:latest' locally
latest: Pulling from library/fedora
e71c36a80ba9: Pull complete
Digest: sha256:7ae08e5637170eb47c01e315b6e64e0d48c6200d2942c695d0bee61b38c65b39
Status: Downloaded newer image for fedora:latest


- rm 옵션으로 컨테이너 종료 시 메모리에서 제거 함.

[root@docker101 ~]# docker run -it --rm --name  test1 ubuntu

root@4827363965d2:/# exit
exit
[root@docker101 ~]# docker ps -a | grep test1
컨테이너 삭제 됨



-- 컨테이너 일괄 삭제

[root@8966d567038a /]# docker rm -f $(docker ps -aq)



# 컨테이너에서 호스트로 파일 copy

[root@docker101 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND              CREATED             STATUS              PORTS                NAMES
8ed1084f0289        ubuntu              "/bin/bash"          3 hours ago         Up 2 hours                               hopeful_wescoff
90288a0ca2f4        httpd               "httpd-foreground"   4 hours ago         Up 4 hours          0.0.0.0:80->80/tcp   web
[root@docker101 ~]# docker cp 8ed1084f0289:/etc/passwd .
[root@docker101 ~]# ls passwd
passwd


컨테이너 별로 모니터링

[root@docker105 build3]# docker stats registry
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
c17726580ae9        registry            0.00%               3.484MiB / 1.796GiB   0.19%               48.4MB / 146kB      69.1MB / 81.8MB     7


현재 기동중인 프로세스

[root@docker101 dir1]# docker top  webserver
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                1905                1887                0                   05:22               ?                   00:00:00            httpd -DFOREGROUND
bin                 1942                1905                0                   05:22               ?                   00:00:00            httpd -DFOREGROUND
bin                 1943                1905                0                   05:22               ?                   00:00:00            httpd -DFOREGROUND
bin                 1944                1905                0                   05:22               ?                   00:00:00            httpd -DFOREGROUND



# 실행중인 컨테이너에 명령 실행

[root@docker101 dir1]# docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                  NAMES
3b3d885edcc1        ubuntu              "/bin/bash"              29 seconds ago      Up 28 seconds                              sleepy_volhard


[root@docker101 dir1]# docker exec 3b3d885edcc1 cat /etc/hosts
127.0.0.1    localhost

[root@docker101 dir1]# docker exec 3b3d885edcc1 vmstat 1
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 7  0     48 321652   2108 1217704    0    0     3    13   61  116  0  0 100  0  0
 0  0     48 324360   2108 1217704    0    0     0     0  154  300  0  1 100  0  0
 0  0     48 324464   2108 1217752    0    0     0     0  126  169  0  0 100  0  0
 0  0     48 324464   2108 1217752    0    0     0     0  128  180  0  0 100  0  0


호스트에서도 80 포트로 확인 가능




# 컨테이너 이벤트

[root@docker101 ~]# docker stop 3b3d885edcc1


- 다른세션으로 events 명령을 통해 액션 로그 확인 가능

[root@docker101 dir1]# docker events
2018-08-08T08:17:44.025431145+09:00 container kill 3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd (image=ubuntu, name=sleepy_volhard, signal=15)
2018-08-08T08:17:54.040524313+09:00 container kill 3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd (image=ubuntu, name=sleepy_volhard, signal=9)
2018-08-08T08:17:54.075219996+09:00 container exec_die 3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd (execID=5464c939cbfb5fe7329e303047115785ec19888a56e476108e49f5e368a59449, exitCode=137, image=ubuntu, name=sleepy_volhard)
2018-08-08T08:17:54.156535057+09:00 container die 3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd (exitCode=137, image=ubuntu, name=sleepy_volhard)
2018-08-08T08:17:54.338161210+09:00 network disconnect 57d3e396b66ca705e1364fad465816fb5d1f8ce627cc12c749f7000be31a9d17 (container=3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd, name=bridge, type=bridge)
2018-08-08T08:17:54.420927195+09:00 container stop 3b3d885edcc1dcdca7cd5ec65f34386a2ca24af73d4bd487508d66e183742ddd (image=ubuntu, name=sleepy_volhard)




# cAdvisor 설치 - 컨테이너 성능 수집

[root@docker101 ~]# docker run \
>    --detach=true \
>    --volume=/:/rootfs:ro \
>    --volume=/var/run:/var/run:rw \
>    --volume=/sys:/sys:ro \
>    --volume=/var/lib/docker/:/var/lib/docker:ro \
>    --publish=8080:8080 \
>    --privileged=true \
>    --name=cadvisor \
> google/cadvisor:latest

Unable to find image 'google/cadvisor:latest' locally
latest: Pulling from google/cadvisor
ab7e51e37a18: Pull complete
a2dc2f1bce51: Pull complete
3b017de60d4f: Pull complete
Digest: sha256:9e347affc725efd3bfe95aa69362cf833aa810f84e6cb9eed1cb65c35216632a
Status: Downloaded newer image for google/cadvisor:latest
2cb63732df9709bdfdbe21d3f37d27b4f612aca637faa66bbec062d5b480e0e0
 



http://docker101.example.com:8080/containers/






'Cloud > Docker' 카테고리의 다른 글

실습-container storage  (0) 2018.08.09

관련글 더보기

댓글 영역