Docker Community Forums

Share and learn in the Docker community.

ElasticSearch Config - Issues SSHing into default linux machine

I’ve recently installed Docker on Windows 10 Enterprise in order to run an Elasticsearch environment. Going through the documentation here, I’m instructed to run docker-machine ssh and run sudo sysctl -w vm.max_map_count=262144, however, when I do so, I receive:

Error: No machine name(s) specified and no “default” machine exists

A quick look at docker-machine ls does now show any machines, but I do see the MobyLinuxVM running in HyperV. Is this the machine I should be connecting to, or am I needing to create another machine outside of MobyLinuxVM?

This need to be executed on the Docker host, which in your case is the MobyLinuxVM.

It is a pitty that Docker Compose/Docker Swarm does not provide the initContainer concept that Kubernets has.

Though, there might be an alternative to mimic Kubernetes’s initContainer concept for Docker Compose deployment:
– run an alpine container with privileges, make the ‘sudo’ line the containers comamnd. make sure to set the restart policy of the container “none” to make it act like a one shot container.
– configure the elastic search container has the restart policy always or unless-stopped or how ever this was for compose. Once the one shot container applied its command, the next restart of the elastic search container should see that the required kernel parameters are available.

his is completly untested by has high changes of working :slight_smile: