Code Monkey home page Code Monkey logo

mobymac's Introduction

mobymac

Automagically install Docker in a VirtualBox VM with super-fast NFS mounts.

What does it do?

  • Uninstall Docker for Mac
  • Install Virtualbox
  • Install docker client binaries
  • Create a Vagrant VM with Docker installed
  • Automatically start VM on boot/login
  • Set up NFS mounts for VM
  • Set up docker environment in .bash_profile, .zprofile or fish.config (optional!)

Installation

  1. Clone this repo:
git clone https://github.com/dziemba/mobymac.git ~/.mobymac
cd ~/.mobymac

You can use a different path if you like. The directory needs to stay where it is though after running the installer, otherwise the VM won't boot the next time.

  1. Run the installer
# Install with default settings
# (4096MB RAM, 50GB data disk, automatic shell integration, VM IP: 192.168.42.2)
./install.sh

# Or run the installer with custom settings
# ./install.sh [VM memory in MB] [data disk size in GB] [shell integration] [VM IP subnet]
./install.sh 2048
./install.sh 2048 30
./install.sh 2048 30 manual
./install.sh 2048 30 manual 192.168.142
  • Shell integration can be either auto (default) or manual.
  • IP subnet must be in the form of a.b.c.
  • The host will use a.b.c.1, the VM will use a.b.c.2.

Updating / Reinstallation

It's the same as installing - just run it again!

Uninstalling

Run ./uninstall.sh in your mobymac checkout.

Known Limitations

  • Filesystem watching (inotify) does not work. Please use polling instead if possible. See #6
  • NFS mounts have less guarantees regarding FS consistency - in practise it should just work (tm)
  • Ports are not mapped to localhost - use 192.168.42.2 to access docker ports
  • Virtualbox (and thus mobymac) doesn't work on Apple Silicon / M1 Chips

Why?

Docker for Mac is an awesome project - use it if you can. Once the above issues have been resolved, this project will become obsolete.

Troubleshooting

Cannot connect to the Docker daemon at tcp://192.168.42.2:2376. Is the docker daemon running?

  1. Start the VM: VBoxManage startvm mobymac --type headless
  2. If that doesn't help, re-install mobymac.

Virtualbox Installation fails

  1. Uninstall virtualbox: brew cask uninstall virtualbox
  2. If the above step failed: reboot and try again
  3. Install virtualbox: brew cask install virtualbox
  4. If the above step failed: Open System Preferences -> Security & Privacy -> General, then allow the kernel extension. Reboot and try step 3 again.
  5. Run the mobymac installer (again).
  6. If that still fails, try the whole process one more time and reboot generously. Open an Issue on this project if you're still having trouble.

Creating the VM fails (VirtualBox error)

  1. If the above step failed: Open System Preferences -> Security & Privacy -> General, then allow the kernel extension.
  2. Reboot your computer.
  3. Run the mobymac installer (again).

exports: ... conflicts with existing export ...

  1. Open /etc/exports: sudo vim /etc/exports
  2. Delete all content
  3. Run the mobymac installer (again).

Permission denied @ apply2files - /usr/local/lib/docker/cli-plugins

  1. Run sudo rm -rf /usr/local/lib/docker
  2. Run the mobymac installer (again).

Other Problems

Please open an issue if you're stuck.

Contributing

Feel free to open issues about feature requests or create PRs.

License

MIT, see LICENSE

mobymac's People

Contributors

dziemba avatar madjar avatar stevesoundcloud avatar theophani avatar yuseinishiyama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mobymac's Issues

Host and container filesystems out of sync

Thanks so much for sharing your work! I gave this a try, but after I initially was super happy how well it worked I realised an issue related to watching files that are mounted from the host. I am unsure whether I am simply not using the right mount options or whether what I am trying to do will not work. Our use case is to mount a source directory with -v on docker run, and having a webpack-dev-server running in the container. Whenever a file is changed in the source directory, the dev server should recompile, which it doesn't.

To reproduce (without webpack-dev-server, just using inotifywait):

test.txt

test text

test.sh

#!/bin/sh
while inotifywait test.txt; do
  echo "file changed"
done

Dockerfile

FROM ubuntu:18.04

RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
    inotify-tools

WORKDIR /home

CMD chmod +x test.sh && ./test.sh
  • build docker image docker build -t mobytest .
  • run docker container with pwd mounted docker run -it --rm -v $(pwd):/home mobytest:latest --> watches should be established, leave open
  • test from host: echo "host waz here" > test.txt --> no file change detected, cat test.txt in container shows change has in fact been made
  • test from within container: echo "docker waz here" > test.txt --> file change detected

What I have tried

  • docker-machine-nfs ${VMNAME} --mount-opts="noacl,async,noatime,actimeo=1,nfsvers=3" (same as from install.sh)
  • docker-machine-nfs ${VMNAME} --mount-opts="noacl,async,nolock,vers=3,udp,noatime,actimeo=2"(from this article)
  • removing async option
  • setting sync option
  • setting shared folder to actual source directory

any help would be greatly appreciated :)

Don't exit script if Docker for Mac (native) fails

If Docker for Mac (native) doesn't exist on the machine, the script outputs:

=== Uninstalling Docker for Mac (native)...
./install.sh: line 166: /Applications/Docker.app/Contents/MacOS/Docker: No such file or directory


+===============================================+
|               ERRORS FOUND                    |
| Inspect logs and ask for assistance if needed |
+===============================================+

For troubleshooting help, go to:
https://github.com/dziemba/mobymac#troubleshooting

Let the script continue whether or not Docker for Mac exists.

Provide a method to uninstall

It would be nice to have a way to uninstall mobymac. That could be some some section in the README offering guidance for a manual uninstall or an automated script.

VirtualBox installation failure on macOS Mojave

Problem

When installing for the first time on macOS Mojave, VirtualBox fails to install because the system refuses to load the kernel extension:

Error: Failure while executing; `/usr/bin/sudo -E -- env LOGNAME=mr USER=mr USERNAME=mr /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/5.2.22,126460/VirtualBox.pkg -target /` exited with 1. Here's the output:
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

At this time, a pop-up appears notifying that an extension was blocked. After allowing it in the Security preference pane, the second installation runs into

(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

Workaround

Open VirtualBox, delete the "default" VM, then run the installer again.

Allow the extension, then reboot, then run the installer again.

[I] ~/s/g/d/mobymac (master|✔) [130] $ ./install.sh fish
=========
 mobymac
=========

Creating docker v18.06.1-ce VM with 4096MB RAM and fish shell integration

WARNING: this will uninstall docker4mac and destroy all existing docker data
Press CTRL-C to abort (sleeping for 5 seconds)

=== Uninstalling Docker for Mac...
=== Not found - skipping

=== Installing Virtualbox...
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

==> Caveats
To install and/or use virtualbox you may need to enable their kernel extension in

System Preferences → Security & Privacy → General

For more information refer to vendor documentation or the Apple Technical Note:

https://developer.apple.com/library/content/technotes/tn2459/_index.html

==> Satisfying dependencies
==> Downloading https://download.virtualbox.org/virtualbox/5.2.22/VirtualBox-5.2.22-126460-OSX.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'virtualbox'.
==> Installing Cask virtualbox
==> Running installer for virtualbox; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
Password:
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==> Purging files for version 5.2.22,126460 of Cask virtualbox
Error: Failure while executing; /usr/bin/sudo -E -- env LOGNAME=mr USER=mr USERNAME=mr /usr/sbin/installer -pkg /usr/local/Caskroom/virtualbox/5.2.22,126460/VirtualBox.pkg -target / exited with 1. Here's the output:
installer: Package name is Oracle VM VirtualBox
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)

Follow the instructions here:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/system_command.rb:107:in assert_success' /usr/local/Homebrew/Library/Homebrew/system_command.rb:50:in run!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:27:in run' /usr/local/Homebrew/Library/Homebrew/system_command.rb:31:in run!'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:59:in block in run_installer' /usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:65:in with_choices_file'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:52:in run_installer' /usr/local/Homebrew/Library/Homebrew/cask/artifact/pkg.rb:32:in install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:209:in block in install_artifacts' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/set.rb:674:in each' /usr/local/Homebrew/Library/Homebrew/cask/installer.rb:200:in install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:95:in install' /usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:21:in block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:in each' /usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:14:in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:34:in run' /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:89:in run_command'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:155:in run' /usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:120:in run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in cask' /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in '
[I] ~/s/g/d/mobymac (master|✔) [1] $ ./install.sh fish

mobymac

Creating docker v18.06.1-ce VM with 4096MB RAM and fish shell integration

WARNING: this will uninstall docker4mac and destroy all existing docker data
Press CTRL-C to abort (sleeping for 5 seconds)

=== Uninstalling Docker for Mac...
=== Not found - skipping

=== Installing Virtualbox...
=== Already installed - skipping

=== Removing old docker packages...
===> OK

=== Installing docker packages...
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

==> Downloading https://homebrew.bintray.com/bottles/docker-18.09.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/fd/fd7f17039daf874ced54a20a4d0b285cebcc35edf547a6ac62a5beb6c4c05326?__gda__=exp=1542973329~hmac=941786fcfb688c68ddbd537a9060a960ae786
######################################################################## 100.0%
==> Pouring docker-18.09.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions

fish completions have been installed to:
/usr/local/share/fish/vendor_completions.d
==> Summary
🍺 /usr/local/Cellar/docker/18.09.0: 8 files, 48.9MB
==> Installing dependencies for docker-compose: libyaml, gdbm, openssl, readline, sqlite, xz and python
==> Installing docker-compose dependency: libyaml
==> Downloading https://homebrew.bintray.com/bottles/libyaml-0.2.1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libyaml-0.2.1.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/libyaml/0.2.1: 9 files, 299.3KB
==> Installing docker-compose dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gdbm-1.18.1.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/gdbm/1.18.1: 20 files, 591.2KB
==> Installing docker-compose dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2p.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ca/cabda4ca62a0b206366658e36ce7175e7da5f8ad24846843611ed19d7759404b?__gda__=exp=1542973337~hmac=a42bba2397da400b8d9e3f0d622260b243cd7
######################################################################## 100.0%
==> Pouring openssl-1.0.2p.mojave.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
echo 'set -g fish_user_paths "/usr/local/opt/openssl/bin" $fish_user_paths' >> ~/.config/fish/config.fish

For compilers to find openssl you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/openssl/lib"
set -gx CPPFLAGS "-I/usr/local/opt/openssl/include"

==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2p: 1,793 files, 12MB
==> Installing docker-compose dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.5.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/59/5976a79f0dbd5ccb2a261f692763319d612309caa2b8cf703f209270764c657c?__gda__=exp=1542973345~hmac=8cc9fa7922afaf08f372928727be8c014d984
######################################################################## 100.0%
==> Pouring readline-7.0.5.mojave.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/readline/lib"
set -gx CPPFLAGS "-I/usr/local/opt/readline/include"

==> Summary
🍺 /usr/local/Cellar/readline/7.0.5: 46 files, 1.5MB
==> Installing docker-compose dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.25.3.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/6e/6e6e8e439db5458beba5ed5eedd45650f1db85709df6902e8be8a3853077eb65?__gda__=exp=1542973347~hmac=fa75bc6295dedd20d2b3a9523bb9efd37536c
######################################################################## 100.0%
==> Pouring sqlite-3.25.3.mojave.bottle.tar.gz
==> Caveats
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
echo 'set -g fish_user_paths "/usr/local/opt/sqlite/bin" $fish_user_paths' >> ~/.config/fish/config.fish

For compilers to find sqlite you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/sqlite/lib"
set -gx CPPFLAGS "-I/usr/local/opt/sqlite/include"

==> Summary
🍺 /usr/local/Cellar/sqlite/3.25.3: 11 files, 3.7MB
==> Installing docker-compose dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.4.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/01/010667293df282c8bceede3bcd36953dd57c56cef608d09a5b50694ab7d4b96b?__gda__=exp=1542973349~hmac=efed92a823f0d9abe5889c097f39e93ed271b
######################################################################## 100.0%
==> Pouring xz-5.2.4.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.4: 92 files, 1MB
==> Installing docker-compose dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/5c/5cc9c4b87eb68c2b2f491cf907ee4517279bfc2c4e41c366ef994aebff7e9684?__gda__=exp=1542973354~hmac=adb31ab5faf88b4f5e629492cc910824782e6
######################################################################## 100.0%
==> Pouring python-3.7.1.mojave.bottle.tar.gz
==> /usr/local/Cellar/python/3.7.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.1/bin --install-lib=/usr/local/lib/
==> /usr/local/Cellar/python/3.7.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.1/bin --install-lib=/usr/local/lib/
==> /usr/local/Cellar/python/3.7.1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.1/bin --install-lib=/usr/local/lib/
==> Caveats
Python has been installed as
/usr/local/bin/python3

Unversioned symlinks python, python-config, pip etc. pointing to
python3, python3-config, pip3 etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
brew install python@2

You can install Python packages with
pip3 install
They will install into the site-package directory
/usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺 /usr/local/Cellar/python/3.7.1: 3,820 files, 59.2MB
==> Installing docker-compose
==> Downloading https://homebrew.bintray.com/bottles/docker-compose-1.23.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e0/e0ff1f3b92d2a5988ad5b189845eed2365488858caad420a4987870975e9d157?__gda__=exp=1542973375~hmac=57610e89cf947fa7fd3712276e709955fe671
######################################################################## 100.0%
==> Pouring docker-compose-1.23.1.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/docker-compose/1.23.1: 892 files, 9MB
==> Downloading https://homebrew.bintray.com/bottles/docker-machine-0.16.0.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/9a/9aec00d16a4a501a17247b170739f23e66f0c86a3d0543bc65419bf4463b2431?__gda__=exp=1542973382~hmac=c8c57033fc3369d3b44a660823f7983cbb7d5
######################################################################## 100.0%
==> Pouring docker-machine-0.16.0.mojave.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions

To have launchd start docker-machine now and restart at login:
brew services start docker-machine
Or, if you don't want/need a background service you can just run:
docker-machine start
==> Summary
🍺 /usr/local/Cellar/docker-machine/0.16.0: 11 files, 35.7MB
==> Downloading https://github.com/adlogix/docker-machine-nfs/archive/0.5.1.tar.gz
==> Downloading from https://codeload.github.com/adlogix/docker-machine-nfs/tar.gz/0.5.1
######################################################################## 100.0%
🍺 /usr/local/Cellar/docker-machine-nfs/0.5.1: 5 files, 18.4KB, built in 6 seconds
==> Caveats
==> docker
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions

fish completions have been installed to:
/usr/local/share/fish/vendor_completions.d
==> openssl
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
echo 'set -g fish_user_paths "/usr/local/opt/openssl/bin" $fish_user_paths' >> ~/.config/fish/config.fish

For compilers to find openssl you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/openssl/lib"
set -gx CPPFLAGS "-I/usr/local/opt/openssl/include"

==> readline
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.

For compilers to find readline you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/readline/lib"
set -gx CPPFLAGS "-I/usr/local/opt/readline/include"

==> sqlite
sqlite is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have sqlite first in your PATH run:
echo 'set -g fish_user_paths "/usr/local/opt/sqlite/bin" $fish_user_paths' >> ~/.config/fish/config.fish

For compilers to find sqlite you may need to set:
set -gx LDFLAGS "-L/usr/local/opt/sqlite/lib"
set -gx CPPFLAGS "-I/usr/local/opt/sqlite/include"

==> python
Python has been installed as
/usr/local/bin/python3

Unversioned symlinks python, python-config, pip etc. pointing to
python3, python3-config, pip3 etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
brew install python@2

You can install Python packages with
pip3 install
They will install into the site-package directory
/usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> docker-compose
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> docker-machine
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions

To have launchd start docker-machine now and restart at login:
brew services start docker-machine
Or, if you don't want/need a background service you can just run:
docker-machine start
===> OK

=== Removing existing VMs...
About to remove default
WARNING: This action will delete both local reference and remote instance.
Error removing host "default": Docker machine "default" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
Can't remove "default"
===> OK

=== Creating docker VM...
Creating CA: /Users/mr/.docker/machine/certs/ca.pem
Creating client certificate: /Users/mr/.docker/machine/certs/cert.pem
Running pre-create checks...
(default) Image cache directory does not exist, creating it at /Users/mr/.docker/machine/cache...
Creating machine...
(default) Downloading /Users/mr/.docker/machine/cache/boot2docker.iso from https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso...
(default) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue

Support port mappings for VM access instead of subnet

Just curious if anyone would consider or is interested in a configuration whereby the VM running docker engine is accessed through port mapping (e.g., 127.0.0.1:2375) instead of a separate IP on a internal-network subnet (e.g., 192.168.42.2:2375 given the default subnet of 192.168.42.0/24).

A use case for this would be people on corporate VPN connections. Often a VPN client forces all non-whitelisted subnets to be routed through the VPN tunnel - thereby making it impossible to route to a VM on the non-whitelisted internal network subnet.

The downside of such an approach is that port mappings to running containers on the VM could become cumbersome to manage. I don't have a great solution for that one at this time.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.