How to login local machine and change system parameter when use docker for mac [closed]

I use docker for mac and did create any other vm after install.

And I use spujadas/elk-docker to run elk.

  • Docker on Windows 10. E: Unable to locate package. Returns non-zero code 123
  • java code for producer/consumer not able to connect kafka in docker setup
  • Docker volume performance degradation
  • Docker container is killed after ~1 minute
  • Docker container with Python Web App - Connect to Postgres on Host machine (OSX)
  • docker build taking too much time in aws ecs
  • The log shows vm.max_map_count is too low.

    So my question is how to change it on local vm?

    docker-machine can not list any local machine.

    So i can’t ssh to local vm and modify it?

  • How to deploy docker image of artifactory-oss on marathon without permissions issues
  • nginx proxy_pass to a linked docker container
  • Jenkins: pass (environment) variable to Docker while building the image
  • Docker: uwsgi service not recognised
  • docker create service vs. docker deploy stack
  • Thousands of cAdvisor Docker containers created until disk runs out of space
  • One Solution collect form web for “How to login local machine and change system parameter when use docker for mac [closed]”

    The troubleshooting section mentions:

    In particular, the message max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144] means that the host’s limits on mmap counts must be set to at least 262144.

    Use sysctl vm.max_map_count to view the current value, and see Elasticsearch’s documentation on virtual memory for guidance on how to change this value.

    sysctl -w vm.max_map_count=262144
    

    Note that the limits must be changed on the host; they cannot be changed from within a container.

    You can ssh to the default machine with docker-machine ssh (which must exist if you ever run any container).

    See Install Elasticsearch with Docker:


    OSX with Docker Toolbox

    The vm_max_map_count setting must be set via docker-machine:

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

    If you have docker for Mac and its whyve VM, see this thread:

    screen
    ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
    

    To exit:

    CTRL+A CTRL+\ followed by "y" 
    

    You will see a similar recommendation in “Install Elasticsearch with Docker”:

    The vm_max_map_count setting must be set within the xhyve virtual machine:

    $ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
    

    Log in with root and no password.
    Then configure the sysctl setting as you would for Linux:

    sysctl -w vm.max_map_count=262144
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.