Couchbase with docker: maximum allowed quota for the node is 368MB error although docker has 3GB of ram

For education I try to run a couchbase from docker on a t3a.nano aws instance (512MB).

Just at the beginning, at Couchbase > New Cluster > Configure I get

insufficient memory to satisfy memory quota for the services (requested quota is 1024MB, maximum allowed quota for the node is 368MB)

I added 2GB of swap to host aws vm. And tried running docker container with

-m 2048m --memory-swap 3000m

but it doesn’t help.

Whre is the problem? Docker vm has memory set on cmd. How can I deceive docker or couchbase about available memory ? (I don’t mind swapping, I just wanna play with it).

[ec2-user@ip-10-0-0-11 ~]$ free -h
total used free shared buff/cache available
Mem: 461M 322M 15M 156K 122M 127M
Swap: 2,0G 87M 1,9G