Docker How To Allocate More Memory
It is easy to allocate more memory with Docker. There are a few things that you will want to consider though.
If you want to increase the memory limit of a Docker container you could use a command like this to increase it to 300M.
docker run -tid -m 300M ubuntu
Or the following command set it to 10G.
docker run -tid -m 10G ubuntu
Keep in mind that you will still be limited by the memory of the physical host or virtual machine that the container runs in.
If you are running Docker on MacOS or Windows it will be running in a virtual machine which will constrain the memory available to your containers. You will need to increase the memory on the VM if you want to exceed it.
Check out these docs for more information on running docker on MacOS or Windows: