[환경 구축] docker 1.boot2docker에서 5시에 하고 싶은 거.

8885 단어 Dockerboot2docker

컨디션

  • Mac 10.9.5
  • homebrew
  • boot2docker
  • docker
  • 결론

  • 이곳을 참고하여 docker1.5 환경을 준비할 수 있습니다.
  • [이터레이션] Boot2 docker를 통한 Docker VM 버전 업그레이드
  • boot2 docker 자체도 필요boot2docker upgrade
  • boot2 docker,docker,docker(server/vm)가 1.5로 변경되었습니다.
  • 해보고 싶었던docker stats 해봤어요
  • docker1.5가 나왔다

  • DOCKER 1.5: IPV6 SUPPORT, READ-ONLY CONTAINERS, STATS, “NAMED DOCKERFILES” AND MORE
  • 기분 나빠
  • brew update

  • 기존 환경의 영향 고려 사항은 다음과 같다
  • brew upgrade docker boot2docker
  • boot2 docker 이때1.4.1.
  • 1.4.1요?
  • boot2docker ssh

  • 하지만, docker 자체가 당시 사용했던 버전에서
  • 1.3.0입니까?낡았다.
  • % boot2docker ssh
                            ##        .
                      ## ## ##       ==
                   ## ## ## ##      ===
               /""""""""""""""""\___/ ===
          ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
               \______ o          __/
                 \    \        __/
                  \____\______/
     _                 _   ____     _            _
    | |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
    | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
    | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
    |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
    boot2docker: 1.3.0
    
    1.
    docker@boot2docker:~$ docker version
    Client version: 1.3.0
    Client API version: 1.15
    Go version (client): go1.3.3
    Git commit (client): c78088f
    OS/Arch (client): linux/amd64
    Server version: 1.3.0
    Server API version: 1.15
    Go version (server): go1.3.3
    Git commit (server): c78088f
    

    홈brew 버전이 업그레이드 됐는데.

    % brew upgrade docker boot2docker
    Error: docker 1.4.1 already installed
    Error: boot2docker 1.4.1 already installed
    

    boot2docker restart

  • 서비스를 다시 시작하려면(확인되지 않음)
  • 홈brew와 다른 관리는 버전 업그레이드가 필요합니다.

  • 참조 사이트: [이터레이션] Boot2 docker를 통한 Docker VM 버전 업그레이드
  • delete 따라서 기존 환경에 영향을 미칠 수 있음
  • ## dockerのVM削除
    % boot2docker delete
    ## docker vmのダウンロード
    % boot2docker download
    Latest release for boot2docker/boot2docker is v1.5.0
    Downloading boot2docker ISO image...
    Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.5.0/boot2docker.iso
            to /Users/xxx/.boot2docker/boot2docker.iso
    %
    % boot2docker init
    % boot2docker up
    Waiting for VM and Docker daemon to start...
    ......................oooooooooooooooooooooo
    Started.
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/ca.pem
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/cert.pem
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/key.pem
    Your environment variables are already set correctly.
    

    boot2docker ssh

    % boot2docker ssh
                            ##        .
                      ## ## ##       ==
                   ## ## ## ##      ===
               /""""""""""""""""\___/ ===
          ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
               \______ o          __/
                 \    \        __/
                  \____\______/
     _                 _   ____     _            _
    | |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
    | '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
    | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
    |_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
    Docker version 1.5.0, build a8a31ef
    
    1.
    docker@boot2docker:~$ docker version
    Client version: 1.5.0
    Client API version: 1.17
    Go version (client): go1.4.1
    Git commit (client): a8a31ef
    OS/Arch (client): linux/amd64
    Server version: 1.5.0
    Server API version: 1.17
    Go version (server): go1.4.1
    Git commit (server): a8a31ef
    

    docker1.해보다

  • Stats의 기능을 해보고 싶어요.
  • refs: https://github.com/docker/docker/pull/9984
  • 그러나, boot2docker 1.4.1
  • boot2docker ssh docker에서 작업하지 않으면 명령이 없습니다.
  • 위에 있지만.

    docker@boot2docker:~$ docker --help | grep stats
        stats     Display a live stream of one or more containers' resource usage statistics
    

    boot2 docker 자체 버전 업그레이드

    % boot2docker upgrade
    Backing up existing docker binary...
    Downloading new docker client binary...
    Success: downloaded https://get.docker.com/builds/Darwin/x86_64/docker-latest
            to /usr/local/bin/docker
            The old version is backed up to ~/.boot2docker.
    Backing up existing boot2docker binary...
    Downloading new boot2docker client binary...
    Success: downloaded https://github.com/boot2docker/boot2docker-cli/releases/download/v1.5.0/boot2docker-v1.5.0-darwin-amd64
            to /usr/local/bin/boot2docker
            The old version is backed up to ~/.boot2docker.
    Latest release for boot2docker/boot2docker is v1.5.0
    Downloading boot2docker ISO image...
    Success: downloaded https://github.com/boot2docker/boot2docker/releases/download/v1.5.0/boot2docker.iso
            to /Users/xxx/.boot2docker/boot2docker.iso
    Waiting for VM and Docker daemon to start...
    ...........oooo
    Started.
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/ca.pem
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/cert.pem
    Writing /Users/xxx/.boot2docker/certs/boot2docker-vm/key.pem
    Your environment variables are already set correctly.
    
    % boot2docker version
    Boot2Docker-cli version: v1.5.0
    Git commit: ccd9032
    

    boot2 docker에서 docker stats 사용 가능

    % docker stats
    docker: "stats" requires a minimum of 1 argument. See 'docker stats --help'.
    

    일어서다

  • 적당히

  • 자화자찬하다에서 동작 확인
  • docker pull ume3/docker-ubuntu-monit-log
  • 적당히 운전
  • docker stats

  • 다음을 표시할 수 있습니다...top 같은 동작(옵션은 help보다 아직 없는 것 같다)
  • % docker stats $(docker ps -q)
    
    ## 表示し続ける
    
    CONTAINER           CPU %               MEM USAGE/LIMIT       MEM %               NET I/O
    05050378f39a        0.32%               96.52 MiB/1.961 GiB   4.81%               1.266 KiB/648 B
    

    좋은 웹페이지 즐겨찾기