Ulimit open files in containers

Hi,

I’ve got the same question. I have an openldap server that hogs memory when run within a container. Looking round on the net, the docker people set ulimit -n 1024 to resolve the problem.

I try to do the same on my lxc container. From the host I do…

lxc config set ldapserver limits.kernel.nofile 1024

but it seems I’m not doing it right.

error: Bad key: limits.kernel.nofile

Looking at the docs, the key should be correct. I’m obviously missing something basic here.

Any pointer please?
Cheers.