docker/machine

Adding custom settings into /var/lib/boot2docker/profile

nguoianphu opened this issue · 1 comments

I'm using Windows machine and running Docker by Docker Toolbox. To run Elasticsearch 5.0, we have to increase the Docker host (boot2docker) virtual memory.

docker-machine ssh default
sudo vi /var/lib/boot2docker/profile
# Add this line into /var/lib/boot2docker/profile
sysctl -w vm.max_map_count=262144
# Now exit and check 
exit
docker-machine restart default

However, after restarting my Windows machine, docker-machine resets the file /var/lib/boot2docker/profile. How to keep this value persistent?

Same issue here but I don't know if it was resolved or not?

Solved.

docker-machine ssh default
sudo vi /var/lib/boot2docker/bootlocal.sh
# Add this line into /var/lib/boot2docker/bootlocal.sh
sysctl -w vm.max_map_count=262144
sudo chmod +x /var/lib/boot2docker/bootlocal.sh