Docker Toolbox/boot2 docker/VirtualBox를 삭제하고 Docker for Mac(public beta)로 살아가기

더욱 치밀하고 간단한 생활을 위해 저는 Docker Toolbox/boot2 docker/Virtual Box를 삭제하고 Docker for Mac로 살아갈 준비를 하겠습니다.

Requirements

  • Intel Mac
  • Mac OS X 10.11.5
  • Docker Toolbox (Kitematic, Docker Machine, Docker Compose, Quickstart, boot2docker etc.)
  • Oracle VM VirtualBox 5.0.14 (optional)
  • Install Docker for Mac

  • Download dmg installer from docker-for-mac .
  • Extract the DMG and execute the binary.
  • Migrate Docker Machine environment from (GUI)
  • Uninstall Docker Toolbox (macOS)


    Execute uninstall script from Docker Inc.


    docker/toolbox offers their Toolbox uninstalling script (CLI):
    sh
    curl -sO https://raw.githubusercontent.com/docker/toolbox/371a106a9d58fa9badd4ab527d5f3cb2c2855abf/osx/uninstall.sh
    sudo bash uninstall.sh
    

    Results

    Remove all Docker Machine VMs? (Y/N): y
    Usage: docker-machine rm [OPTIONS] [arg...]
    
    Remove a machine
    
    Description:
       Argument(s) are one or more machine names.
    
    Options:
    
       --force, -f  Remove local configuration even if machine cannot be removed, also implies an automatic yes (`-y`)
       -y       Assumes automatic yes to proceed with remove, without prompting further user confirmation
    Error: Expected to get one or more machine names as arguments
    Removing Applications...
    Removing docker binaries...
    Removing boot2docker.iso
    Forget packages
    Forgot package 'io.docker.pkg.docker' on '/'.
    Forgot package 'io.docker.pkg.dockercompose' on '/'.
    Forgot package 'io.docker.pkg.dockermachine' on '/'.
    Forgot package 'io.boot2dockeriso.pkg.boot2dockeriso' on '/'.
    All Done!
    

    Remove backups by Docker for Mac installer



    Docker for Mac installer made backup and so let's remove all backups as follows:
    $ ll /usr/local/bin/docker*.backup
    -rwxr-xr-x  1 tnir  admin  4938393 Dec  5  2015 /usr/local/bin/docker-compose.backup*
    -rwxr-xr-x  1 tnir  admin  9039648 Dec  1  2015 /usr/local/bin/docker-machine.backup*
    -rwxr-xr-x  1 tnir  admin  9231840 Dec  5  2015 /usr/local/bin/docker.backup*
    
    $ rm -i /usr/local/bin/docker*.backup
    

    Uninstall Oracle VM VirtualBox

  • Download the latest VirtualBox 5.0.xx for OS X host package (DMG) from https://www.virtualbox.org/wiki/Downloads
  • Follow the uninstall instruction
  • Results

    $ /Volumes/VirtualBox/VirtualBox_Uninstall.tool ; exit;
    
    Welcome to the VirtualBox uninstaller script.
    
    The following files and directories (bundles) will be removed:
        /Users/tnir/Library/LaunchAgents/org.virtualbox.vboxwebsrv.plist
        /usr/local/bin/VirtualBox
        /usr/local/bin/VBoxManage
        /usr/local/bin/VBoxVRDP
        /usr/local/bin/VBoxHeadless
        /usr/local/bin/vboxwebsrv
        /usr/local/bin/VBoxBalloonCtrl
        /usr/local/bin/VBoxAutostart
        /usr/local/bin/VBoxDTrace
        /usr/local/bin/vbox-img
        /Library/LaunchDaemons/org.virtualbox.startup.plist
        /Library/Python/2.6/site-packages/vboxapi/VirtualBox_constants.py
        /Library/Python/2.6/site-packages/vboxapi/VirtualBox_constants.pyc
        /Library/Python/2.6/site-packages/vboxapi/__init__.py
        /Library/Python/2.6/site-packages/vboxapi/__init__.pyc
        /Library/Python/2.6/site-packages/vboxapi-1.0-py2.6.egg-info
        /Library/Python/2.7/site-packages/vboxapi/VirtualBox_constants.py
        /Library/Python/2.7/site-packages/vboxapi/VirtualBox_constants.pyc
        /Library/Python/2.7/site-packages/vboxapi/__init__.py
        /Library/Python/2.7/site-packages/vboxapi/__init__.pyc
        /Library/Python/2.7/site-packages/vboxapi-1.0-py2.7.egg-info
        /Library/Application Support/VirtualBox/LaunchDaemons/
        /Library/Application Support/VirtualBox/VBoxDrv.kext/
        /Library/Application Support/VirtualBox/VBoxUSB.kext/
        /Library/Application Support/VirtualBox/VBoxNetFlt.kext/
        /Library/Application Support/VirtualBox/VBoxNetAdp.kext/
        /Applications/VirtualBox.app/
        /Library/Python/2.6/site-packages/vboxapi/
        /Library/Python/2.7/site-packages/vboxapi/
    
    And the following KEXTs will be unloaded:
        org.virtualbox.kext.VBoxUSB
        org.virtualbox.kext.VBoxNetFlt
        org.virtualbox.kext.VBoxNetAdp
        org.virtualbox.kext.VBoxDrv
    
    And the traces of following packages will be removed:
        org.virtualbox.pkg.vboxkexts
        org.virtualbox.pkg.virtualbox
        org.virtualbox.pkg.virtualboxcli
    
    Do you wish to uninstall VirtualBox (Yes/No)?
    yes
    
    The uninstallation processes requires administrative privileges
    because some of the installed files cannot be removed by a normal
    user. You may be prompted for your password now...
    
    Please enter your password:
    unloading org.virtualbox.kext.VBoxUSB
    unloading org.virtualbox.kext.VBoxNetFlt
    unloading org.virtualbox.kext.VBoxNetAdp
    unloading org.virtualbox.kext.VBoxDrv
    Successfully unloaded VirtualBox kernel extensions.
    Forgot package 'org.virtualbox.pkg.vboxkexts' on '/'.
    Forgot package 'org.virtualbox.pkg.virtualbox' on '/'.
    Forgot package 'org.virtualbox.pkg.virtualboxcli' on '/'.
    Done.
    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.
    Deleting expired sessions...10 completed.
    
    [Process completed]
    
    $ which VBoxManage || echo "No VirtualBox"
    No VirtualBox
    

    Final results


    Docker 1.12.0-rc2

    $ docker version
    Client:
     Version:      1.12.0-rc2
     API version:  1.24
     Go version:   go1.6.2
     Git commit:   906eacd
     Built:        Fri Jun 17 20:35:33 2016
     OS/Arch:      darwin/amd64
     Experimental: true
    
    Server:
     Version:      1.12.0-rc2
     API version:  1.24
     Go version:   go1.6.2
     Git commit:   a7119de
     Built:        Fri Jun 17 22:09:20 2016
     OS/Arch:      linux/amd64
     Experimental: true
    
    darwin/amd64!!!

    docker info

    $ docker info
    Containers: 0
     Running: 0
     Paused: 0
     Stopped: 0
    Images: 0
    Server Version: 1.12.0-rc2
    Storage Driver: aufs
     Root Dir: /var/lib/docker/aufs
     Backing Filesystem: extfs
     Dirs: 0
     Dirperm1 Supported: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
     Volume: local
     Network: null host bridge overlay
    Swarm: inactive
    Runtimes: default
    Default Runtime: default
    Security Options: seccomp
    Kernel Version: 4.4.13-moby
    Operating System: Alpine Linux v3.4
    OSType: linux
    Architecture: x86_64
    CPUs: 2
    Total Memory: 1.954 GiB
    Name: moby
    ID: KJBH:UXY6:GC4G:VH66:IFBX:C72G:H4ZA:UFWN:WKBX:HN26:VZSA:HXM4
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): true
     File Descriptors: 21
     Goroutines: 28
     System Time: 2016-06-25T09:00:30.549850203Z
     EventsListeners: 1
    No Proxy: *.local, 169.254/16
    Registry: https://index.docker.io/v1/
    Experimental: true
    Insecure Registries:
     127.0.0.0/8
    
    Alpine 3.4!!!

    Summary


    Docker for Mac으로 전환하더라도 이전처럼 Machine과 Compose를 사용할 수 있습니다.그럼 편하게 Docker 생활 하세요.
    $ docker-compose version
    docker-compose version 1.8.0-rc1, build 9bf6bc6
    docker-py version: 1.8.1
    CPython version: 2.7.9
    OpenSSL version: OpenSSL 1.0.2h  3 May 2016
    $ docker-machine version
    docker-machine version 0.8.0-rc1, build fffa6c9
    
    Toolbox와 비교할 때는 다음을 참조하십시오.
  • https://docs.docker.com/docker-for-mac/docker-toolbox/
  • 좋은 웹페이지 즐겨찾기