DynamicMemory allocation for Docker VM

Right now my docker container needs lot of memory to run and sometimes not, assigning a static memory would make my computer slow all the time
How do i use dynamic memory allocation in docker for windows so that i works according to the programs i run on the containers.

Thanks,
Gaddam Suresh.