2016-11-10 11 views
34

ब्रू से डॉकर सेट करने का प्रयास कर रहा है, हालांकि इंजन किसी भी आधिकारिक सूत्रों में शामिल नहीं है।ब्रू इंस्टॉल डॉकर में डॉकर इंजन शामिल नहीं है?

brew install docker-machine docker-compose 

तो ये केवल क्लाइंट इंस्टॉल करता है? क्या इंजन/डिमन के साथ कोई keg नहीं है?

उत्तर

30

brew install docker 

चल रहा यह डोकर इंजन है, जो मैक पर चलाने के लिए की आवश्यकता होगी डोकर-मशीन (+ VirtualBox) स्थापित हो जाएगा: प्रयास करें।

आप नए Docker for Mac स्थापित करना चाहते हैं, तो आप Homebrew के पीपा के माध्यम से है कि स्थापित कर सकते हैं:

brew cask install docker 
+1

'डोकर-लिखें' ऊपर सिर्फ मुझे देता है: एक त्रुटि "आपको डॉकर-मशीन प्रारंभ डिफ़ॉल्ट चलाने की आवश्यकता हो सकती है" मैं अपने कंटेनर के लिए वर्चुअल बॉक्स नहीं चलाऊंगा, मैं इसे अपने मैक –

+2

पर स्थानीय रूप से चलाने के लिए चाहता हूं। मैंने मैक के लिए डॉकर को इंस्टॉल करने के तरीके को दिखाने के लिए अपना जवाब अपडेट कर दिया है, जिसके लिए वर्चुअलबॉक्स या डॉकर-मशीन की आवश्यकता नहीं है। – nwinkler

+0

मैं देख सकता हूं कि यह मुझे पूरा डेस्कटॉप ऐप देता है। क्या केवल डेमन + क्ली उपकरण प्राप्त करने का कोई तरीका नहीं है, मैं इसे "हेडलेस" ओएसएक्स पर चलाने के लिए चाहता हूं। –

54

निम्न चरणों के MacOS सिएरा 10.12.4 पर ठीक काम करते हैं। ध्यान दें कि ब्रूव डॉकर इंस्टॉल करने के बाद, docker कमांड (प्रतीकात्मक लिंक) /usr/local/bin पर उपलब्ध नहीं है। पहली बार डॉकर ऐप चलाने से यह प्रतीकात्मक लिंक बन जाता है। नीचे दिए गए विस्तृत चरणों को देखें।

  1. डॉकर इंस्टॉल करें।

    brew cask install docker 
    
  2. लॉन्च डॉकर।

    • प्रेस कमांड + अंतरिक्ष स्पॉटलाइट खोजें को लाने और डोकर लांच करने के लिए Docker दर्ज करने के लिए।
    • में डॉकर को विशेषाधिकार प्राप्त पहुंच संवाद बॉक्स की आवश्यकता है, ठीक पर क्लिक करें।
    • पासवर्ड दर्ज करें और ठीक पर क्लिक करें।

    जब डॉकर इस तरीके से लॉन्च किया जाता है, तो स्थिति मेनू में एक डॉकर व्हेल आइकन दिखाई देता है। जैसे ही व्हेल आइकन दिखाई देता है, docker, docker-compose, docker-credential-osxkeychain और docker-machine के लिए प्रतीकात्मक लिंक /usr/local/bin में बनाए जाते हैं। स्थिति मेनू में डोकर व्हेल आइकन पर

    $ ls -l /usr/local/bin/docker* 
    lrwxr-xr-x 1 susam domain Users 67 Apr 12 14:14 /usr/local/bin/docker -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker 
    lrwxr-xr-x 1 susam domain Users 75 Apr 12 14:14 /usr/local/bin/docker-compose -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-compose 
    lrwxr-xr-x 1 susam domain Users 90 Apr 12 14:14 /usr/local/bin/docker-credential-osxkeychain -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-credential-osxkeychain 
    lrwxr-xr-x 1 susam domain Users 75 Apr 12 14:14 /usr/local/bin/docker-machine -> /Users/susam/Library/Group Containers/group.com.docker/bin/docker-machine 
    
  3. क्लिक करें और यह दिखाने के लिए डोकर चल रहा है प्रतीक्षा करें।

    enter image description here enter image description here

  4. टेस्ट कि डोकर ठीक काम करता है।

    $ docker run hello-world 
    Unable to find image 'hello-world:latest' locally 
    latest: Pulling from library/hello-world 
    78445dd45222: Pull complete 
    Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7 
    Status: Downloaded newer image for hello-world:latest 
    
    Hello from Docker! 
    This message shows that your installation appears to be working correctly. 
    
    To generate this message, Docker took the following steps: 
    1. The Docker client contacted the Docker daemon. 
    2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 
    3. The Docker daemon created a new container from that image which runs the 
        executable that produces the output you are currently reading. 
    4. The Docker daemon streamed that output to the Docker client, which sent it 
        to your terminal. 
    
    To try something more ambitious, you can run an Ubuntu container with: 
    $ docker run -it ubuntu bash 
    
    Share images, automate workflows, and more with a free Docker ID: 
    https://cloud.docker.com/ 
    
    For more examples and ideas, visit: 
    https://docs.docker.com/engine/userguide/ 
    
    $ docker version 
    Client: 
    Version:  17.03.1-ce 
    API version: 1.27 
    Go version: go1.7.5 
    Git commit: c6d412e 
    Built:  Tue Mar 28 00:40:02 2017 
    OS/Arch:  darwin/amd64 
    
    Server: 
    Version:  17.03.1-ce 
    API version: 1.27 (minimum version 1.12) 
    Go version: go1.7.5 
    Git commit: c6d412e 
    Built:  Fri Mar 24 00:00:50 2017 
    OS/Arch:  linux/amd64 
    Experimental: true 
    
  5. आप docker-machine उपयोग करने के लिए आभासी मशीन बनाने जा रहे हैं, तो VirtualBox के स्थापित करें।

    brew cask install virtualbox. 
    

    ध्यान दें कि यदि VirtualBox के स्थापित नहीं है, तो docker-machine निम्न त्रुटि के साथ विफल रहता है।

    $ docker-machine create manager 
    Running pre-create checks... 
    Error with pre-create check: "VBoxManage not found. Make sure VirtualBox is installed and VBoxManage is in the path" 
    
+2

स्पष्ट नहीं हो सकता है, thx! – herve

+1

इस उत्तर का सबसे अच्छा हिस्सा यह है कि लेखक अतिरिक्त जानकारी प्रदान करता है जो उन लोगों को बनाता है जिनके पास अपने कंप्यूटर के लिए ओसीडी है (जैसे मेरे) को आश्वस्त महसूस होता है। धन्यवाद! – dawnstar

+1

विस्तृत स्पष्टीकरण। – forethought

3

homebrew साथ मैक के लिए डोकर स्थापित करने के लिए:

brew cask install docker 

कमांड लाइन पूरा होने को स्थापित करने के:

brew install bash-completion 
brew install docker-completion 
brew install docker-compose-completion 
brew install docker-machine-completion