How to easily install and uninstall docker on MacOs

前端 未结 2 439
醉话见心
醉话见心 2020-12-24 10:22

My question is

How to easily install docker to have it available in terminal and how to uninstall docker on osx?

相关标签:
2条回答
  • 2020-12-24 11:06

    To Install:

    1. Go Here
    2. Click the "Get Docker" or "Get Docker Desktop for Mac (Stable)" button.
    3. Double-click the DMG
    4. Drag Docker into Applications
    5. Open Docker
    6. Open Terminal after install and docker will be available. Docker should auto-launch on subsequent startups and be available on command line.

    To Uninstall:

    1. Click On Docker Icon
    2. Select Preferences
    3. Select Bug Icon for the Troubleshoot menu (Bomb Icon in older Docker UI)
    4. Select Uninstall

    0 讨论(0)
  • 2020-12-24 11:14

    By command line

    INSTALL

    First install cask by type in terminal

    brew tap phinze/homebrew-cask
    brew install brew-cask
    

    and then type:

    brew cask install docker

    And run docker by

    open /Applications/Docker.app

    (or by macOs bottom menu> launchpad > docker - on first run docker will ask you about password)

    Thats all :)

    UNINSTALL

    Type brew cask uninstall docker

    • thats all :)

    To clean everything (including images/containers) execute below commands:

    sudo rm -Rf /Applications/Docker
    sudo rm -f /usr/local/bin/docker
    sudo rm -f /usr/local/bin/docker-machine
    sudo rm -f /usr/local/bin/docker-compose
    sudo rm -f /usr/local/bin/docker-credential-osxkeychain
    sudo rm -Rf ~/.docker
    sudo rm -Rf $HOME/Library/Containers/com.docker.docker  # here we delete stored images
    
    0 讨论(0)
提交回复
热议问题