Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).

Docker For Mac 1.13.0 brings support for macOS Sierra, now runs ARM & AARCH64 based Docker containers

3 min read

Recently I purchased a brand new slim 13.3 inch Apple Mac Book  Air with an amazing 1.6GHz dual-core Intel Core i5 processor. Introducing Siri to newly re-branded macOS for the first time along with dozens of new features, it came by default running macOS 10.12.1 Sierra. macOS Sierra is the 13th major release of macOS(previously OS X)and successor of OS X El Capiton. ICYMI – Apple released macOS 10.12 Sierra open source Darwin code last November and can be accessed via https://opensource.apple.com/release/os-x-1012.html . One of the first thing I wanted to try out was to see how easy is it to bring Docker 1.13.0 up and running on this system. Trust me, it was an amazing experience. Under this blog post, I am going to share my experience with Docker 1.13.0 and what you really need to know about Docker for Mac on macOS Sierra.

16487451_10209801703852550_7429605017657917198_o

In case you are too new to Docker For Mac…

Last year during March time frame, Docker announced and released a native beta support for Mac and Windows, rightly termed as “Docker for Mac” & “Docker for Windows” respectively. They started with a closed beta & provided access to a couple of early adopters. During Dockercon 2016, they announced Final GA release for both the platforms.

Docker for Mac Vs. Docker Toolbox

difference_between_MacOSToolbox_D4M

 

Pre-Requisite:

  1. Docker for Mac only works on OS X 10.11 or newer macOS release.
  2. Apple Mac must be running 2010 or newer Mac system, with Intel HW support for MMU Virtualization.
  3. Docker for Mac require atleast 4GB of RAM to function smoothly.

Currently the installer comes in the form of 2 channels – stable and Beta. Under the stable channel, the installer is fully tested and comes with the latest GA version of Docker Engine. The Experimental feature is enabled by default.Under Beta channel, the installer provides the latest beta release of Docker for Mac with experimental features enabled by default.

Features enablement under Docker 1.13.0:

Features_1130

Getting Started with Docker Engine 1.13.0 on macOS Sierra

Installing Docker for Mac is one of fantastic experience I ever had installing any software. Just 3 simple steps:

  • Download Docker for Mac by clicking on this link and double-click Docker.dmg which opens up the installer.
  • Drag Moby the whale to the Application Folder as shown below:

Screen Shot 2017-01-29 at 2.52.53 PM

 

3.  Authorize Docker.app with your system password and double-click Docker.app to get started as shown below:

Screen Shot 2017-01-29 at 2.59.02 PM

Screen Shot 2017-01-29 at 2.59.12 PM

Screen Shot 2017-01-29 at 2.59.30 PM

 

Now this is really amazing. Docker for Mac comes with the default availability of docker-compose, docker-machine and experimental feature by default as shown below:

Screen Shot 2017-01-29 at 3.00.25 PM

  1. Verify the docker compose version:

bash-3.2# docker-compose version
docker-compose version 1.10.0, build 4bd6f1a
docker-py version: 2.0.1
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016

2. Verify the docker-machine version:

bash-3.2# docker-machine version

docker-machine version 0.9.0, build 15fd4c7

Kudos to Docker Engineers, the whale in the status bar is all you need to have a glimpse of overall Docker daemon running and easy way to configure Docker preferences & environment as per your need:

Screen Shot 2017-01-29 at 3.03.25 PM

Open the terminal and you can see that Docker for Mac runs on top of Alpine Linux v3.5, default storage driver as overlay2, Plugins support and many more.

Screen Shot 2017-01-29 at 6.04.50 PM

Multi-CPU Architecture Support(ARM, AARCH64 & PPC64le):

Apple Inc. added support for an ARM chip to the latest macOS Sierra 10.12 kernel. At the right time, Docker for Mac made binfmt_misc multi architecture support available,which means that now you can run containers for different Linux architectures, such as arm, aarch64 ppc64le and even s390x.

I couldn’t wait to test-drive few of Raspberry Pi ARM-based Docker images on my Mac Book Air. Here is how I tested few of ARM -based images:

bash-3.2# docker run -itd ajeetraina/centos7-arm /bin/bash

Unable to find image ‘ajeetraina/centos7-arm:latest’ locally

latest: Pulling from ajeetraina/centos7-arm

5584ea4c92c5: Pull complete

a3ed95caeb02: Pull complete

Digest: sha256:10989b1b7a3bdf826857ba5b3348956d495b9be1ced644a3aa7321cfbd705b04

Status: Downloaded newer image for ajeetraina/centos7-arm:latest

a719fb80aac98c2f2daddd7c5374bb2739d03285e74f7523cb0cc36258fc605e

bash-3.2# docker ps

CONTAINER ID        IMAGE                    COMMAND             CREATED             STATUS              PORTS               NAMES

a719fb80aac9        ajeetraina/centos7-arm   “/bin/bash”         2 minutes ago       Up 2 minutes                            suspicious_goldwasser

bash-3.2# docker exec -it a719f cat /etc/issue\S

Kernel \r on an \m

bash-3.2#

Please Note – The containers need to have the appropriate qemu binary inside the container to work, without qemu you can pull ARM-based Docker images but can’t run it.

Filesystem Sharing with OSXFS:

Docker for Mac brings a new shared filesystem, rightly called OSXFS  solution . OSXFS provides a close-to-native user experience for bind mounting OS X file system trees into Docker containers. It brings a number of unique capabilities as well as differences from a classical Linux file system. It does not use OSXFUSE and doesn’t run under, inside, or between OS X user space processes and the OS X kernel.

There are number of concerns around performance degradation around OSXFS and I think Docker team has rightly addressed it. It is worth reading  https://docs.docker.com/docker-for-mac/osxfs/#/performance-issues-solutions-and-roadmap to understand the problem statement and taking the right step. Said that, Docker team is continuously working to bring improvement under this space.

In the future blog post, I will talk about newer features and bug fixes which comes with Engine 1.13.0. Feel free to share if you like and reach out to me via @ajeetsraina(t).

 

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server