Seite wählen

NETWAYS Blog

Docker on OSX

DockerLogoRunning Docker on OSX can be made possible using different methods:

Docker containers require kernel features which are only available in modern Linux kernels. In order to run Docker on OSX for example, one needs a virtual machine with a smallish Linux running in it.

Docker for Mac Beta

Docker for Mac uses xhyve, a lightweight OS X virtualization solution built on top of Hypervisor.framework. This requires you to run OS X 10.10 Yosemite and higher. The VM is provisioned with Alpine Linux running Docker engine.
The Docker API is exposed in /var/run/docker.sock where the docker and docker-compose CLI commands may directly communicate with. This is one of the benefits compared to Docker machine, especially when you do not need to manage your docker VM, or set specific environment variables before running it. Docker for Mac is further installed as native OSX application and only provides symlinks to /usr/local/bin/{docker,docker-compose}.
After the app is installed, I only had to manually add the bash-completion provided by Homebrew.

cd /usr/local/etc/bash_completion.d
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion

I was granted a beta access key for Docker for Mac today 🙂 Even if this is still beta, it already feels much more integrated into my test and development workflow rather than using Docker machine. Awesome job! 🙂


 

Docker Machine

Docker machine will use Virtualbox as VM provider. In order to avoid manual interaction in each terminal I’m opening I’ve added an alias into my bashrc file.

vim $HOME/.bashrc
alias enable_docker=". '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'"

This script doesn’t do much except for starting the VM using the Virtualbox cli tools and then source the exported variables into your current shell environment. That way the docker client will be able to communicate with the docker daemon running inside the VM.

Parallels instead of Virtualbox

While Virtualbox works fine there are significant performance improvements when using Parallels on OSX. Furthermore it is reasonable to only use one application firing virtual machines (the Icinga Vagrant boxes also provide support for Parallels as Vagrant provider).
I was therefore looking for a native Parallels driver for Docker. Following this issue shed some light on the history of Docker drivers and their support as plugins. Parallels doesn’t seem to be officially supported by Docker themselves according to their documentation. Though there is an official driver plugin from Parallels themselves which works for Pro and Business subscriber editions only. The main reason seems to be the limited cli features in the Standard edition.

Requirements for Parallels

The main requirement is at least Docker 1.9.1 providing the Docker toolbox 0.5.1+.

Installation

I’m using Homebrew, the manual installation parts are described in the documentation. Brew tries to pull docker-machine as well – if you’re using the version from docker.com you can safely ignore the linking error.

brew install docker-machine-parallels

Create a docker machine

docker_machine_parallels_runUse the driver „parallels“ and add the name „docker-parallels“. This will create a new Parallels VM with 20GB HDD and 1GB RAM by default. In case you want to disable sharing the /User mounts, add –parallels-no-share.

docker-machine create --driver=parallels docker-parallels

Add the environment variables to your shell and run docker pulling the latest Fedora container.

eval $(docker-machine env docker-parallels)
docker run -ti fedora:latest bash

Automate it

I’ve partially modified the Docker toolbox script in order to support Parallels.

wget https://raw.githubusercontent.com/dnsmichi/docker-tools/master/toolbox/scripts/osx/start.sh -O /usr/local/bin/enable_docker
chmod +x /usr/local/bin/enable_docker
enable_docker

 

Conclusion

While the Docker Machine integration allows room for improvement the Parallels driver works like a charm. Though I have to admit – while looking into the Parallels integration, Docker announced Docker for Mac and I was eagerly waiting for it.
Both methods are working, but the Docker for Mac application integrated natively into OSX is pretty slick. I like it a lot!
If you are looking for more Docker and its many possibilities – follow our blog closely and visit the Docker training sessions 🙂

Teltonika ModemUSB/E10 – Jetzt auch mit x64 Treiber für Windows!

teltonika sms berater
In letzter Zeit häuften sich die Anfragen seitens unserer Kunden, ob ein x64 Treiber für Windows Systeme verfügbar wäre. Diese Anfragen können wir heute positiv beantworten:
Ab sofort steht für das Teltonika ModemUSB/E10 eine x64 Software sowie ein Treiber zum Download bereit. Der Treiber wird mit der Software-Installation nicht automatisch mit installiert, sondern lediglich im Installations-Ordner unter „Driver“ abgelegt. Daher haben wir diesen extrahiert und separat angeboten.
Die Software selbst macht aus dem USB Modem ein sehr nützliches Addon für Windows-Systeme. Man verfügt nicht nur über die Möglichkeit, das Modem als richtiges Gateway für die Internetverbindung zu nutzen, sondern sie fungiert auch gleich als SMS-Client, da hierüber sowohl SMS versendet als auch empfangen werden können.
Das wirklich hervorzuhebende ist, dass man eine komplette Übersicht über die gesendeten, empfangen sowie die gelesenen und ungelesenen SMS hat. Die Weboberfläche ist ebenfalls sehr schön anzusehen und intuitiv bedienbar.
Hier ein Screenshot, der die Software Oberfläche zeigt:
Teltonika ModemUSB/E10 - Software
Wer bei der Installation des Treibers oder der Software Hilfe benötigt, findet hier einen FAQ-Eintrag in unserem Online-Shop, der Schritt für Schritt das Vorgehen zur Installation zeigt.
Interesse an diesem oder anderen Produkten für Ihre Überwachung?
Dann besuchen Sie einfach unseren NETWAYS Online-Shop.
Für einen persönlichen Kontakt stehen wir Ihnen ebenfalls sehr gerne zur Verfügung – nutzen Sie hierfür einfach unser Kontaktformular, schreiben Sie uns eine E-Mail oder rufen Sie uns an! Alle Details zum Shop-Kontakt finden Sie hier.

Christian Stein
Christian Stein
Manager Sales

Christian kommt ursprünglich aus der Personalberatungsbranche, wo er aber schon immer auf den IT Bereich spezialisiert war. Bei NETWAYS arbeitet er als Manager Sales und berät unsere Kunden in der vertrieblichen Phase rund um das Thema Monitoring. Gemeinsam mit Georg hat er sich Mitte 2012 auch an unserem Hardware-Shop "vergangen".