By default, docker engine presents the entire system memory to a container. Hard limits can be set with -m command, however, it doesn't look like ns_server (or some related process) is able to detect this limit. Part of the problem is even the 'free' command will return the enter amount of memory of the docker engine, but checking the cgroup/memory dir shows that the container limits has been set:
ie.. 4GB limit
couchbase has it at 8GB
Would be great if we can have couchbase detect that these limits has been set as we are currently looking to verify some DGM tests, and I suspect eviction will not occur unless we hit watermarks which are being set too high.