Skip to main content

A faster Docker for Mac experience

Docker for Mac is freaking slow, this is known issue for years. I'm switching to docker-machine running within Parallels for now...

Image from unsplash.com


Install the tools

I use brew to quickly install these:

brew install docker-machine

brew install docker-machine-parallels


Create the virtual machine

The --driver param and vm name is required. The others are all optional, the default values are quite low so I bumped the specs a bit.

docker-machine create --driver=parallels \
  --parallels-cpu-count=2 \
  --parallels-disk-size=100000 \
  --parallels-memory=4096 \
  parallels


Usage

Set up the shell environment:

eval $(docker-machine env parallels)

Then use the cli as normal:

docker ls

docker-compose up -d

To get the vm IP address:

docker-machine ip parallels

Comments

Popular posts from this blog

Flutter: Fixing Firebase header not found with Notification Service Extension

If you follow the FCM tutorial Send an image in the notification payload and encountered this error message: 'FirebaseMessaging/FirebaseMessaging.h' file not found You are on the right place, I'm going to show you how to fix it. My app was working fine but one day it stopped compiling. Apparently Flutter 1.20 changed the way it uses CocoaPod so the service extension no longer has the proper library configured. After some tinkering, I came up with this pod config, it has to be added to ios/Podfile below the main Runner target. target 'FcmImage' do use_frameworks! use_modular_headers! require File.expand_path('../.symlinks/plugins/firebase_core/ios/firebase_sdk_version.rb', __FILE__) firebase_sdk_version = firebase_sdk_version! pod 'Firebase/Messaging', "~> #{firebase_sdk_version}" end FcmImage is my extension name, replace it with yours We can use a hardcoded version for Firebase/Messaging pod but doing so m...

OAuth with Google, Twitter and... Facebook!

This is sick! Just a few days ago, I ran into OAuth as I want to get my GMail feed based on Google Data API . I succeeded. With a little help of an OAuth open source ( here , available in several programming languages). Then I remember that I once heard that Twitter also uses OAuth as an authentication option so I turned into Twitter and had a good read. Finally, I found out that they are basically the same (hehe, it's obvious since OAuth 1.0 is a worldwide standard). I had an idea of writing a universal class which can handle both Google and Twitter OAuth functionalities. It's not too hard. I took most of the idea from the PHP example ( here , PHP only). I also made a small script which accepts URI to send and intercept response from Google & Twitter servers. At that moment, I was so excited with all the ideas but actually it has no real world benefit so I just left it there... Until today, in the F8 (says "fate") conference of Facebook, I was stunned fin...