Improved docker support in APM

When running in docker, RAM size reported is the memory allocated for container instead of entire memory of host.
Detail on blog.