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.

  • Why does Docker have a daemon?
  • How can a Docker image build locally, but not at remote destination?
  • Cayley docker isn't writing data
  • Docker not running on OS/X
  • How does Docker bypass needing an OS?
  • How to run a docker container on a USB drive?
  • 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?

  • Docker container running but can't view in browser
  • Docker --volumes-from permissions
  • Dockerfile or Registry? Which is the preferred strategy for distribution?
  • 403 on Laravel Docker setup
  • Why are certain operations on mounted volume in a Docker container really slow?
  • Docker network - Why docker container responds on 127.0.0.1?
  • 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.