https://rancher.com/ logo
Title
d

damp-dinner-23240

12/02/2022, 8:33 AM
Hi Rancher team. It has been a great experience using this app on mac with M1 chip. But I get into some problem when I run docker images (mysql). Can anyone help ?? Below is the docker-compose I’ve used
version: "3"
services:
  db:
    container_name: spring-db
    image: mysql
    platform: linux/amd64
    environment:
      MYSQL_DATABASE: todos
      MYSQL_USER: root
      MYSQL_PASSWORD: root
      MYSQL_ROOT_PASSWORD: root
    volumes:
      - ./db/data:/var/lib/mysql:rw
    ports:
      - "3307:3307"
    restart: always
Below is the error I see
👀 1
s

silly-jordan-81965

12/02/2022, 8:46 AM
Seen this as well but with a postgres deploy.
d

damp-dinner-23240

12/02/2022, 8:47 AM
I’ve run docker-compose command with sudo but it also didn’t work… curious how to solve this problem.
e

enough-hairdresser-48119

12/02/2022, 10:09 AM
I had similar issues with Cassandra and Zookeeper mount volumes on an i9 running on Ventura and Rancher 1.6.2. I was able to fix the issue by adding the user id and the group id within the docker compose file but it is not a bullet proof workaround, it did not work for other people (I assume it depends on the underlying MacOS version you are on?)
zookeeper01:
    ...
    user: "123456788:282828282"
    volumes:
      - ./docker-data/zookeeper/data:/data
d

damp-dinner-23240

12/02/2022, 11:14 AM
@enough-hairdresser-48119 May be I should try that, it that user id you added some random id ?
e

enough-hairdresser-48119

12/02/2022, 11:17 AM
@damp-dinner-23240 the value is the result of running from command line 'echo "$(id -u):$(id -g)"'
❤️ 1
d

damp-dinner-23240

12/03/2022, 2:03 AM
@enough-hairdresser-48119 Wow .. this worked for me. Thanks for the help. Thanks
❤️ 1