DEV Community

Cover image for Rancher Desktop on Mac πŸš€
Saurabh Nemade
Saurabh Nemade

Posted on

2

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. πŸŽ‰πŸŽ‰πŸš€

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay