Docker restart with specific memory

I have my docker container that every time I need it i do

docker restart id
docker attach id

What i need to know is how can i start this docker with only 1gb memory.

thanks.

You have to kill container and run again with docker run command and have to give -m as parameter

hello,
Can I restart the container with specific memory?

thanks.