Fail to launch mysql 8.0 docker image on MacOS

I was trying to launch 3 docker containers from mysql 8.0 images with the following commands:

$ docker network create --subnet=172.20.0.0/16 mysqlnet

$ for N in 1 2 3
  do docker run -d --name=node$N --hostname=node$N --net mysqlnet --ip "172.20.0.1$N" 
  -v /Users/myname/Downloads/docker/d$N:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=mypass 
  mysql/mysql-server:8.0 
  --server-id=$N 
  --enforce-gtid-consistency='ON' 
  --log-slave-updates='ON' 
  --gtid-mode='ON' 
  --log-bin='mysql-bin-1.log'
done

The node1 always succeeds, but node2 & 3 almost always fails with the following logs (they occasionally succeed after multiple retries):

$ docker logs 0920bbc5fa1b3335ecfa519489cde8e341d0c410e0c7a38f1d2a8c2413e27e51
[Entrypoint] MySQL Docker Image 8.0.19-1.1.15
[Entrypoint] Initializing database
2020-03-11T21:31:29.525067Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.19) initializing of server in progress as process 20
2020-03-11T21:31:38.713050Z 5 [Warning] [MY-010453] [Server] [email protected] is created with an empty password ! Please consider switching off the --initialize-insecure option.
[Entrypoint] Database initialized
2020-03-11T21:31:46.902285Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 68
2020-03-11T21:31:46.910544Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-03-11T21:31:47.798702Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
2020-03-11T21:31:47.801529Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-03-11T21:31:47.801819Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-03-11T21:31:47.802139Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.

I also tried to add --lower-case-table-names=0 in mysql launch command, but it fails with error:

2020-03-11T21:29:13.714512Z 0 [ERROR] [MY-010158] [Server] The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode.

I’m running on Mac OSX Mojave v10.14.6. My docker & mysql image versions:

$ $ docker --version
Docker version 19.03.5, build 633a0ea

$ docker images | grep mysql
mysql/mysql-server                                          8.0                  a7a39f15d42d        8 weeks ago         381MB

Does anyone know why it fails and how to fix it? Thank you!

Source: StackOverflow