Skip to content

docker LIMA

Prayag edited this page Apr 30, 2023 · 7 revisions

Install LIMA

brew install lima

## @see https://github.com/lima-vm/lima/tree/master/examples
## @see https://blog.carlosnunez.me/post/docker-desktop-alternative-for-mac/
curl -sSLo docker-lima.yaml https://raw.githubusercontent.com/lima-vm/lima/master/examples/docker.yaml

limactl start docker-lima.yaml --tty=false

Lima operations

echo "/Users host data" > database.csv
lima cat database.csv

Install docker

brew install docker
brew install docker-compose

## you might need to overwrite existing version
brew link --overwrite docker
brew link --overwrite docker-compose

export DOCKER_HOST="unix://$HOME/.lima/docker.sock"
docker context create lima-docker-lima --docker "host=unix://$HOME/.lima/docker-lima/sock/docker.sock"
docker context use lima-docker-lima
docker context ls
NAME                 DESCRIPTION                               DOCKER ENDPOINT                                             ERROR
default              Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                 
lima-docker-lima *   

Diagnosis commands

$ limactl  list
NAME           STATUS     SSH                VMTYPE    ARCH      CPUS    MEMORY    DISK      DIR
docker-lima    Running    127.0.0.1:62426    qemu      x86_64    4       4GiB      100GiB    ~/.lima/docker-lima

limactl info
Clone this wiki locally