Permenently allowing an insecure registry on docker-machine / boot2docker

Adding the --insecure-registry flag has been a bit of a pain for me. I’d ssh into the boot2docker machine and edit the file before restarting docker on the VM. Unfortunately every time the docker machine restarted I would lose the configuration and have to perform the same steps again.

Fortunately, I discovered the configuration files for the docker-machines and that it allows you to specify insecure registries by configuration.

Do the following to enable your insecure registry once and for all:

Edit the configuration file for your docker-machine (default in this case):

vi ~/.docker/machine/machines/default/config.json

Locate the `InsecureRegistry` key and simply append your insecure registry to the array.

    "HostOptions": {
        "Driver": "",
        "Memory": 0,
        "Disk": 0,
        "EngineOptions": {
        "ArbitraryFlags": [],
        "Dns": null,
        "GraphDir": "",
        "Env": [],
        "Ipv6": false,
        "InsecureRegistry": [

Then re-provision the machine with:

docker-machine provision default

Note: re-provisioning will likely lose any manual changes you made to the VM.


Excluding node_modules from Sublime Text Ctrl+P file search

Add the following to user preferences (Preferences / Settings – User):

"folder_exclude_patterns": [".git", "node_modules", "bower_components"]

Make sure to restart sublime for the changes to take effect.

The problem with this setting is that it also removes these folders from the sidebar.

If you still want to see the files in the sidebar but still exclude them from search and Ctrl + P you can instead use binary_file_patterns:

"binary_file_patterns": [".git/", "node_modules/", "bower_components/"]

Note that a forward slash is required at the end for directories.

Remember to restart Sublime again.