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
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
Setup Rancher Desktop
brew install --cask rancher
Once setup is done open it & it will look like this:
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
It will fail with following error:
Fixing Volume Permissions in Lima Config
Run
touch /Users/${USER}/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml
echo 'mountType: "9p"' >> /Users/${USER}/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml
Quit and Reopen Rancher Desktop
Run:
docker-compose up
And, congratulation!! you have it running. ๐๐๐
Top comments (0)