Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ngadhvi/71573e084810d41165cfff7a2d5383f6 to your computer and use it in GitHub Desktop.
Save ngadhvi/71573e084810d41165cfff7a2d5383f6 to your computer and use it in GitHub Desktop.
Use docker in mac without docker-

Run docker in macos without docker desktop

NOTE: I want disclaimer that this work is not complete mine. Most of the work here is comming from: https://dhwaneetbhatt.com/blog/run-docker-without-docker-desktop-on-macos

Run brew doctor and update to make sure everything is working and up to date

$ brew doctor
$ brew update

Install hyperkit and minikube

$ brew install hyperkit
$ brew install minikube

Install Docker CLI

$ brew install docker
$ brew install docker-compose

Start minikube

$ bash minikube start

Tell Docker CLI to talk to minikube's VM

$ eval $(minikube docker-env)

Save IP to a hostname

$ echo "`minikube ip` docker.local" | sudo tee -a /etc/hosts > /dev/null

Test

$ docker run hello-world

Install docker-credential-helper

$ install docker-credential-helper

Update your .docker/config.json file to NOT TO USE desktop as credStore

Original (if you had docker-desktop installed)

{
  "credsStore" : "desktop"
}

Update desktop value in credsStore value for osxkeychain After

{
  "credsStore" : "osxkeychain"
}

Portforward ports

Keep in mind that now your ports are being portforward to minikube instead of your localhost. So if you have the 8080 port forwarded insead of localhost:8080 you should get your minikube ip ($ minikube ip) and then do <your_minikube_ip>:8080

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