The first of those is worth fixing: it’s a change to the kernel config, in effect, so it needs to be made in the host, as the container can’t do anything about it. See perhaps MKJ’s Opinionated Discourse Deployment Configuration. The exact change you need to make depends on which distribution you use, but you can see if you’ve succeeded with
# cat /proc/sys/vm/overcommit_memory
1
You want your change to be persistent over a reboot.