Limactl: How to fix chown problems?

1k Views Asked by At

I tried running this docker compose file https://docs.sorry-cypress.dev/guide/dashboard-and-api

I used the docker template

limactl start --name=docker template://docker

With the following mounts inside the docker template

mounts:
- location: "~"
  writable: true

When I run

docker-compose -f ./docker-compose.minio.yml up

I get

Error response from daemon: error while creating mount source path '/Users/me/code/cypress/data/data-mongo-cypress': 
chown /Users/me/code/cypress/data/data-mongo-cypress: permission denied

When I run it with sudo, the first issue is bypassed but then I get this error from the mongo container

cypress-mongo-1          | chown: changing ownership of '/data/db': Permission denied

I tried setting the chmod of Users/me/code/cypress/data/ to 0777 but it doesn't change anything

How to overcome these chown problems?

System
MACOS 13 Ventura
1

There are 1 best solutions below

0
unloco On

I found a solution in the github issues

I edited my lima instance like this

limactl edit docker

Then changed the mountType and the mounts props like this

mountType: "9p"
mounts:
- location: "~"
  writable: true
  9p: 
    securityModel: mapped-xattr
    cache: "mmap"