Docker Desktop To Kubernetes with Minikube + Skaffold

1 December 2021 · Hasan Ozgan · 2 min, 218 words ·

I’ve decided move my all docker dependencies in project move to another alternatives after the docker’s desktop app license policy. First I’ve tried to Podman and Podman Machine. It’s good and very similar with docker commands but the issue is docker-compose files. I’ve realesed to minikube contains a docker server inside. And it works with docker-compose (you should mount your project folder). I want to explain step by step for Mac OSX environment.

Let’s install docker-client, kubectl and minikube via home-brew.

brew install docker docker-compose minikube kubectl hyperkit

Check Docker Version

❯ docker info
Client:
 Context:    default
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Check Hyperkit Version

❯ hyperkit -v
hyperkit: 0.20200908

Homepage: https://github.com/docker/hyperkit
License: BSD

Start Minikube

Minikube Resources Config (optional)

minikube config set cpus 6
minikube config set memory 12g

Minikube Mount Dev Folder Config (optional)

minikube mount /opt:/opt

Minikube Start

minikube start --driver=hyperkit --container-runtime=docker

Your environment almost ready. You can setup your docker environment like below command.

eval $(minikube docker-env)

Check Docker

❯ docker ps

Also docker-compose can work with that setup. But if you want you can use skaffold instead of docker-compose.

Alternative Docker Compose

brew install skaffold
skaffold init --compose-file docker-compose.yml

Other alternatives to skaffold: tild and garden