GithubHelp home page GithubHelp logo

jasonzj / homebrew-docker-virtualbox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sergeycherepanov/homebrew-docker-virtualbox

0.0 0.0 0.0 85 KB

Docker workaround for Ryzentosh (AMD based Hackintosh)

Ruby 23.79% Shell 76.21%

homebrew-docker-virtualbox's Introduction

Homebrew Docker Virtualbox

This formula resolves the Docker issue on AMD based MacOS (Ryzentosh). Also can be used on any Mac.

Installation

Install Virtualbox from Oracle website

https://www.virtualbox.org/wiki/Downloads.

Please don't forget to remove all previous installations.

Install the docker-virtualbox via Homebrew

brew tap sergeycherepanov/docker-virtualbox
brew install docker-virtualbox

Configure the docker-virtualbox requirements

WARNING: Only this commands requires root permissions, all next should be run under your user

Ensure the NFS exports file exists

sudo touch /etc/exports

Allow the staff group to configure NFS shares and the IP balancer works without password prompt

sudo tee /etc/sudoers.d/docker-machine-nfs <<SUDOERS
%staff ALL=(ALL) NOPASSWD: /sbin/nfsd
%staff ALL=(ALL) NOPASSWD: /bin/cp /etc/nfs.conf /etc/nfs.conf.bak
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/exports
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/nfs.conf
%staff ALL=(ALL) NOPASSWD: $(brew --prefix)/opt/docker-virtualbox/bin/gobetween
SUDOERS

Reboot your system to be sure that sudoers applied

Configure the environment

If you didn't install Docker for Mac you can link binaries instead of PATH update

brew link --force --overwrite docker-virtualbox

Otherwise configure the PATH variable

# For the bash
echo "export PATH=\"$(brew --prefix docker-virtualbox)/bin:\$PATH\"" >> ~/.bash_profile
# For the zsh
echo "export PATH=\"$(brew --prefix docker-virtualbox)/bin:\$PATH\"" >> ~/.zshrc

Reload the shell

exec $SHELL

Start the docker-virtualbox service

In the first run according to the permissions policy you need to run it manually and approve permissions.

It should download, create and configure the virtual machine

docker-machine-init initialize

When it will be finished you are ready to enable the service

The log file will be always available in /tmp/docker-virtualbox.log.

brew services start docker-virtualbox 

Verify installation

Test the Docker by running Nginx

docker run -d -p 8989:80 nginx
curl -v localhost:8989

Additional information

SSH connection to the docker-machine

docker-machine ssh docker

To stop the service just run

brew services stop docker-virtualbox 

To setup environment for 3rd party tools (ctop as example)

source /tmp/docker-virtualbox.env

homebrew-docker-virtualbox's People

Contributors

bassrock avatar duck-nukem avatar sergeycherepanov avatar

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.