J.Done
J.Done

Reputation: 3053

Docker-machine - set configuration as default

Everytime I start docker-machine, I need to set a configuration like below.

host> docker-machine ssh default 
docker> sudo sysctl -w vm.max_map_count=262144

I would like to this configuration as default, so I don't need to set it no more.

Upvotes: 1

Views: 671

Answers (1)

Matt
Matt

Reputation: 74811

Boot2Docker allows for local customisation.

Add your sysctl command to /var/lib/boot2docker/bootsync.sh to have it run before docker starts.

echo 'sysctl -w vm.max_map_count=262144' >> /var/lib/boot2docker/bootsync.sh
chmod 755 /var/lib/boot2docker/bootsync.sh

Upvotes: 2

Related Questions