Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Docker Cookbook

You're reading from   Docker Cookbook Over 100 practical and insightful recipes to build distributed applications with Docker

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781788626866
Length 352 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
Neependra K Khare Neependra K Khare
Author Profile Icon Neependra K Khare
Neependra K Khare
Ken Cochrane Ken Cochrane
Author Profile Icon Ken Cochrane
Ken Cochrane
Jeeva S. Chelladhurai Jeeva S. Chelladhurai
Author Profile Icon Jeeva S. Chelladhurai
Jeeva S. Chelladhurai
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction and Installation 2. Working with Docker Containers FREE CHAPTER 3. Working with Docker Images 4. Network and Data Management for Containers 5. Docker Use Cases 6. Docker APIs and SDKs 7. Docker Performance 8. Docker Orchestration and Hosting a Platform 9. Docker Security 10. Getting Help and Tips and Tricks 11. Docker on the Cloud 12. Other Books You May Enjoy

Installing Docker for Mac

Docker for Mac is the fastest and most reliable way to run Docker on a Mac. It installs all of the tools required to set up a complete Docker development environment on your Mac. It includes the Docker command line, Docker Compose, and Docker Notary. It also works well with VPNs and proxies to make it easier when used in a corporate environment.

Recent releases have also added Kubernetes support so that you can easily create a full Kubernetes environment on your machine with just the click of a button.

Getting ready

Docker for Mac has the following system requirements:

  • macOS El Capitan 10.11, or a newer macOS release
  • At least 4 GB of RAM
  • The Mac hardware must be a 2010 or newer model, with Intel's hardware support for Memory Management Unit (MMU) virtualization, including Extended Page Tables (EPT) and unrestricted mode. To see whether your machine supports this, run the following command in a terminal:
        $ sysctl kern.hv_support
kern.hv_support: 1
If your system does not satisfy these requirements, fear not—all is not lost. You can install Docker Toolbox (https://docs.docker.com/toolbox/overview/), which uses Oracle VirtualBox instead of HyperKit. It isn't as good, but it is better than nothing.

How to do it

To install Docker for Mac, go through the following steps:

  1. Download Docker for Mac from the Docker Store at https://store.docker.com/editions/community/docker-ce-desktop-mac. You will need to log in in order to download the installer. If you do not have a Docker account, you can create one at https://store.docker.com/signup.
  2. Open the installation file that you downloaded from the store. It should be called something like Docker.dmg.
  1. Drag and drop the whale icon into the Applications folder:

  1. Double-click the Docker.app icon in the Applications folder to start Docker, as shown in the following screenshot:
  1. You will be prompted to authorize Docker.app with your system password. This is normal—Docker.app needs privileged access to install some of its components. Click OK and enter your password so it can finish installing:
  1. When Docker is finished, a little whale icon will show up in the status menu in the top right of your screen, as shown in the following screenshot:
  1. If you click on the whale, you can access the application preferences and other options.
  2. Select the About Docker button to verify that you have the latest version.
  3. Check to make sure that it is installed and working. Open up a terminal window and type the following:
            $ docker container run hello-world

How it works...

The preceding recipe will download and install a Docker development environment on your Mac.

There's more...

Now that you have Docker for Mac installed, here are a few more tips for getting started:

  • Docker for Mac will automatically check for new updates and let you know when a new version is available for you to install. If you agree to upgrade, it will do all the work, downloading the new version and installing it for you.
  • Kubernetes isn't running by default. If you want to turn it on, you will need to click on the Docker whale icon in your Status menu, then select Preferences. Inside of Preferences, there is a Kubernetes tab. Click on the tab, then click the Enable Kubernetes option, and hit the Apply button:

See also

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image