Giter Club home page Giter Club 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

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.