Can't start elasticsearch 8.5 with docker

Hi everyone. I'm running into the same issue when trying to spin up Elasticsearch in a container on my Mac. I only see this error when I set xpack.security.enabled: true. When security is disabled, the container runs successfully.

Note: I've tried letting Docker use all the available RAM (16GB) and all the available Swap (4GB). That didn't fix my problem. The reason I tried that is because of the comments on this stackoverflow answer.
I've also tried adding the line RUN sysctl -w vm.max_map_count=262144 to the relevant Dockerfile. That hasn't helped either. I did confirm that the command works by first starting the container with security disabled, executing into the container and running sysctl -a to view all the variables; among them was max_map_count=262144.

I would very much appreciate any help that you can provide. :slight_smile: