i was working with the docker toolbox which includes oracle virtual box. There you can see your docker machine settings.
just stop your docker machine with command in docker quickstart terminal
docker-machine stop <docker-machine name>
Then in your oracle virtual box..go to System>Advanced> Increase the memory to 4gb(4096mb)
And start docker-machine with command in docker quickstart terminal
docker-machine start <docker-machine name>
and work with your container.