Estimated Reading Time: 5 minutes
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.
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
- Docker for Mac only works on OS X 10.11 or newer macOS release.
- Apple Mac must be running 2010 or newer Mac system, with Intel HW support for MMU Virtualization.
- 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:
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:
3. Authorize Docker.app with your system password and double-click Docker.app to get started as shown below:
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:
- 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:
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.
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
ppc64le and even
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
Status: Downloaded newer image for ajeetraina/centos7-arm:latest
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
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).