no need to install the docker-desktop package
- We assume you have installed
lima
withbrew
brew install lima
- Download docker template
mkdir -p ${HOME}/.lima/docker wget --output-document ${HOME}/.lima/docker/lima.yaml \ https://raw.githubusercontent.com/lima-vm/lima/refs/heads/master/templates/docker.yaml grep -iq '^NoHostAuthenticationForLocalhost yes' ${HOME}/.ssh/config || \ echo "NoHostAuthenticationForLocalhost yes" >> ${HOME}/.ssh/config
- Now run the lima vm (hosted by ubuntu) using docker
limactl start docker
- Test your first docker container hosted by lima-vm
limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
- Check the docker image inside the lima-vm docker
limactl shell docker docker image ls
To make this lima-vm docker your default docker engine, you just add this line in your session sh file
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker image ls