I’m seeing the same issue when trying to run a container with elasticsearch 5 - wanted to know how you got into the docker vm to change the /etc/sysctl.conf (its asking for a login/password). Ideally it would be possible to change this setting somewhere though.
Edit: For someone else’s reference, I got past this by changing a setting in elasticsearch’s config: bootstrap.ignore_system_bootstrap_checks=true
vim ~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/etc/sysctl.conf — you can use it like this. And don’t forget to git commit it
This is what I did:
docker-machine ssh [machine_name]
sudo vi /var/lib/boot2docker/bootlocal.sh
Add the following command to bootlocal.sh: sysctl -w vm.max_map_count=262144
sudo chmod +x /var/lib/boot2docker/bootlocal.sh
exit