DEV Community

Cover image for Rancher Desktop on Mac 🚀
Saurabh Nemade
Saurabh Nemade

Posted on

Rancher Desktop on Mac 🚀

Note:
This is going to be purely technical short post focusing on getting Rancher desktop to work on Mac with Volume fixes!!

Setup Docker tools

 brew install docker docker-compose 
Enter fullscreen mode Exit fullscreen mode

After running above commands you will get following commands. Simply execute them:

 Compose is now a Docker plugin. For Docker to find this plugin, symlink it: mkdir -p ~/.docker/cli-plugins ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose 
Enter fullscreen mode Exit fullscreen mode

Setup Rancher Desktop

 brew install --cask rancher 
Enter fullscreen mode Exit fullscreen mode

Once setup is done open it & it will look like this:

Rancher Desktop

A sample docker-compose:

 version: '3' services: db: image: postgres:14.4-alpine ports: - '9432:5432' environment: POSTGRES_PASSWORD: docker POSTGRES_USER: docker POSTGRES_DB: postgres PGDATA: /var/lib/pg_data volumes: - ./data:/var/lib/pg_data 
Enter fullscreen mode Exit fullscreen mode

It will fail with following error:

Rancher Postgres permission error

Fixing Volume Permissions in Lima Config
Run

 touch /Users/${USER}/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml 
Enter fullscreen mode Exit fullscreen mode
 echo 'mountType: "9p"' >> /Users/${USER}/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml 
Enter fullscreen mode Exit fullscreen mode

Rancher Lima Fix Volume Permissions

Quit and Reopen Rancher Desktop
Run:

 docker-compose up 
Enter fullscreen mode Exit fullscreen mode

Rancher+Docker+Postgres

And, congratulation!! you have it running. 🎉🎉🚀

Top comments (0)