Installing Docker on an OS X workstation

The story for Docker on Mac has advanced a lot in recent years, and it is now a real, usable development solution for your Mac workstation. Docker CE for Mac requires OS X El Capitan 10.11 or newer macOS releases. The Docker CE app integrates with the hypervisor, network, and filesystem built into OS X. The installation process is simple: download the Docker installer image and launch it. You can download the installer image from the Docker store. You must log in to the Docker store be able to download the install image, so, create an account there if you don't have one already.

Be sure to save your credentials securely as you will need them later.

Browse to the Docker store page for Docker CE for Mac at https://store.docker.com/editions/community/docker-ce-desktop-mac. Remember that you must log into the Docker store to be able to download the installer image.

Once logged in to the Docker store, the Get Docker button will be available to click. Go ahead and click on it to start the download. The Docker CE for Mac install image may take some time to download. When the download has completed, double-click on the Docker.dmg image file to mount and open it:

Once the Docker CE for Mac image has mounted and opened, click the Docker icon and drag it onto the Applications icon to complete the install. The copying Docker to Applications action will be initiated. And when the copy process completes, the Docker application will be available to run from your Applications folder. Double-click on your Docker icon to launch it. Launching Docker for the first time will caution you that you are running an application downloaded from the internet to make sure you really want to open it. When the Docker app opens, you will be greeted with a friendly Welcome to Docker message.

Clicking next on the welcome message will warn you that Docker requires elevated privileges to run and will inform you that you must provide your credentials to install Docker's networking and app links. Enter your username and password. The Docker application will launch, adding a whale icon to the menu-notification area.

You will also be prompted to enter Docker store credentials to allow Docker for Mac to log in to the store. Enter your credentials and click on the Log In button. You will get a confirmation showing that you are currently logged in.

To validate that our installation was successful and confirm the functionality of our installation, we will issue the version command and then run Docker's hello-world container:

# validate install and functionality
docker --version

docker run hello-world

Your macOS workstation is now set up to create Docker images and run Docker containers. You are ready to containerize your apps! You can easily use your terminal window for all of your Docker work, but you may be interested in the graphical UI tool that is available for Mac, called Kitematic. Let's install Kitematic next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset