banner



How To Install Docker On Mac Command Line

Mac OS X users utilise Docker Toolbox to install Docker software. Docker Toolbox includes the following Docker tools:

  • Docker CLI client for running Docker Engine to create images and containers
  • Docker Motorcar so you tin run Docker Engine commands from Mac OS X terminals
  • Docker Compose for running the docker-etch command
  • Kitematic, the Docker GUI
  • the Docker QuickStart crush preconfigured for a Docker control-line environment
  • Oracle VM VirtualBox

Because the Docker Engine daemon uses Linux-specific kernel features, you lot can't run Docker Engine natively in OS X. Instead, you must use the Docker Machine control, docker-auto, to create and attach to a minor Linux VM on your machine. This VM hosts Docker Engine for you on your Mac.

Step 1: Check your version

Your Mac must be running Bone X 10.8 "Mountain Lion" or newer to run Docker software. To find out what version of the Os you have:

  1. Cull Nigh this Mac from the Apple menu.

    The version number appears directly beneath the words Os Ten.

  2. If you have the right version, become to the next step.

    If yous aren't using a supported version, you could consider upgrading your operating system.

    If you lot take Mac Bone Ten ten.10.3 Yosemite or newer, consider using Docker for Mac instead. Information technology runs natively on the Mac, so at that place is no demand for a pre-configured Docker QuickStart shell. Information technology uses xhyve for virtualization, instead of VirutalBox. Full install prerequisites are provided in the Docker for Mac topic in Docker for Mac.

  1. Install Docker Toolbox by double-clicking the package or by right-clicking and choosing "Open" from the pop-upward carte du jour.

    The installer launches an introductory dialog, followed past an overview of what's installed.

    Install Docker Toolbox

  2. Press Proceed to install the toolbox.

    The installer presents you with options to customize the standard installation.

    Standard install

    By default, the standard Docker Toolbox installation:

    • installs binaries for the Docker tools in /usr/local/bin
    • makes these binaries available to all users
    • updates whatsoever existing Virtual Box installation

    For now, don't change whatsoever of the defaults.

  3. Press Install to perform the standard installation.

    The organisation prompts you for your password.

    Password prompt

  4. Provide your countersign to continue with the installation.

    When it completes, the installer provides you lot with some shortcuts. You can ignore this for now and click Continue.

    Quickstart

    So click Close to terminate the installer.

    All finished

Шаг 3: Проверка установки

To run a Docker container, you:

  • create a new (or start an existing) Docker Engine host running
  • switch your environment to your new VM
  • apply the docker client to create, load, and manage containers

In one case you create a motorcar, you can reuse it as oftentimes as you like. Like any Virtual Box VM, it maintains its configuration between uses.

  1. Open the Launchpad and locate the Docker Quickstart Terminal icon.

    Launchpad

  2. Click the icon to launch a Docker Quickstart Terminal window.

    The final does a number of things to gear up up Docker Quickstart Last for y'all.

                    Final login: Sat Jul 11 xx:09:45 on ttys002 fustigate '/Applications/Docker Quickstart Terminal.app/Contents/Resources/Scripts/first.sh' Get http:///var/run/docker.sock/v1.19/images/json?all=one&filters=%7B%22dangling%22%3A%5B%22true%22%5D%7D: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? Become http:///var/run/docker.sock/v1.19/images/json?all=1: dial unix /var/run/docker.sock: no such file or directory. Are yous trying to connect to a TLS-enabled daemon without TLS? -fustigate: lolcat: command non establish  mary at meepers in ~ $ bash '/Applications/Docker Quickstart Last.app/Contents/Resources/Scripts/starting time.sh' Creating Machine dev... Creating VirtualBox VM... Creating SSH fundamental... Starting VirtualBox VM... Starting VM... To see how to connect Docker to this auto, run: docker-machine env dev Starting machine dev... Setting surroundings variables for machine dev...                          ##         .                   ## ## ##        ==                ## ## ## ## ##    ===            /"""""""""""""""""\___/ ===       ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~            \______ o           __/              \    \         __/               \____\_______/  The Docker Quick Beginning Terminal is configured to use Docker with the “default” VM.                              
  3. Click your mouse in the terminal window to make information technology active.

    If you aren't familiar with a final window, here are some quick tips.

    Terminal

    The prompt is traditionally a $ dollar sign. You type commands into the command line which is the expanse later on the prompt. Your cursor is indicated by a highlighted area or a | that appears in the command line. After typing a command, always press Render.

  4. Blazon the docker run howdy-world control and press Return.

    The command does some work for you, if everything runs well, the command'southward output looks similar this:

                    $ docker run hello-world Unable to detect image 'hullo-world:latest' locally latest: Pulling from library/hello-globe 535020c3e8ad: Pull complete af340544ed62: Pull complete Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c Status: Downloaded newer image for hello-earth:latest  Hi from Docker. This bulletin shows that your installation appears to be working correctly.  To generate this message, Docker took the following steps: i. The Docker Engine CLI client contacted the Docker Engine daemon. 2. The Docker Engine daemon pulled the "hello-world" prototype from the Docker Hub. 3. The Docker Engine daemon created a new container from that prototype which runs the    executable that produces the output you lot are currently reading. iv. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it    to your terminal.  To try something more than ambitious, you tin can run an Ubuntu container with: $ docker run -it ubuntu fustigate  Share images, automate workflows, and more with a free Docker Hub account: https://hub.docker.com  For more than examples and ideas, visit: https://docs.docker.com/userguide/                              

Removing Toolbox involves removing all the Docker components it includes.

A full uninstall also includes removing the local and remote machines you created with Docker Automobile. In some cases, yous might want to proceed machines created with Docker Machine.

For instance, if you plan to re-install Docker Motorcar as a part of Docker for Mac you tin continue to manage those machines through Docker. Or, if you have remote machines on a deject provider and you programme to manage them using the provider, you wouldn't want to remove them. So the step to remove machines is described here as optional.

To uninstall Toolbox on a Mac, do the following:

  1. Listing your machines.

                    $ docker-machine ls Proper noun                ACTIVE   Commuter       Country     URL                        SWARM dev                 *        virtualbox   Running   tcp://192.168.99.100:2376    my-docker-machine            virtualbox   Stopped                                default                      virtualbox   Stopped                              
  2. Optionally, remove each machine. For example:

                    $ docker-machine rm my-docker-machine Successfully removed my-docker-machine                              
  3. Remove the Docker Quickstart Concluding and Kitematic from your “Applications” folder.

  4. Remove the docker, docker-compose, and docker-auto commands from the /usr/local/bin binder.

                    $ rm /usr/local/bin/docker $ rm /usr/local/bin/docker-compose $ rm /usr/local/bin/docker-machine                              

Комментарии:

Комментариев нет, желаете стать первым?

Пожалуйста, авторизуйтесь что бы оставлять комментарии.

Source: https://dker.ru/docs/docker-toolbox/install-toolbox-on-mac/

Posted by: donahuewholoney.blogspot.com

0 Response to "How To Install Docker On Mac Command Line"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel