Skip to content

Instantly share code, notes, and snippets.

@mayoralito
Created December 1, 2021 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayoralito/a5f7493b5d0b86be9a6a602082c43ea5 to your computer and use it in GitHub Desktop.
Save mayoralito/a5f7493b5d0b86be9a6a602082c43ea5 to your computer and use it in GitHub Desktop.

Installation

Video with the full explanation: Video: https://www.youtube.com/watch?v=LGNEG-t96eE&list=PLsC0nE-wJ1I6xSDZnGDFIspR6hGt8_uLx&index=1

Install macOS Package Manager from https://brew.sh/

Caution!

Before you do the rest of the steps, I will recommend to uninstall Docker Deskptop if this is your case -> https://www.infoworld.com/article/3630393/docker-desktop-is-no-longer-free-for-enterprise-users.html

Install the software

brew install docker
brew install minikube
brew install hyperkit
brew install docker-compose

Start

minikube start --driver hyperkit
minikube docker-env
eval $(minikube docker-env)

docker & docker-compose commands now work

  • Your regular docker commnands

expose minikube vm to mac

minikube tunnel

   Route 10.96.0.0/12 -> 192.168.64.2

Say you installed a docker container that exposes port 8000...

http://192.168.64.2:8000

Remove all trace of minikube

minikube delete

Docker With VirtualBox

For VirtualBox users on mac. It automatically maps the Mac /Users folder to the vm /Users folder (improvement on what hyperkit offers)

Installation

Install macOS Package Manager from https://brew.sh/

Caution!

Before you do the rest of the steps, I will recommend to uninstall Docker Deskptop if this is your case -> https://www.infoworld.com/article/3630393/docker-desktop-is-no-longer-free-for-enterprise-users.html

Install the software

brew install docker
brew install minikube
brew install --cask virtualbox
brew install docker-compose

Start Driver

minikube start --driver virtualbox

And https://minikube.sigs.k8s.io/docs/commands/start/

minikube ip

Docker Environment

minikube docker-env and eval $(minikube docker-env) the last command would have to be run on every tab in order to work

minikube ssh # connect to vm to see volumes etc. docker & docker-compose commands now work do docker stuff… expose minikube vm to mac

minikube tunnel

... 
Route 10.96.0.0/12 -> 192.168.64.2

Say you installed a docker container that exposes port 8000… point your browser at http://192.168.64.2:8000

Remove all trace of minikube minikube delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment