0

I'm running a container from vast.ai, Ubuntu 20.04 LTS.

I'd like to change memlock limit in the Docker container. Is it possible?

What I've already tried:

  • Changing the memlock limits in /etc/security/limits.conf; tried:
    • * - memlock -1
    • * - memlock unlimited
    • root - memlock unlimited
  • Adding DefaultLimitMEMLOCK=infinity to /etc/systemd/system.conf;
  • Adding UseLogin yes to /etc/ssh/sshd_config;
  • Using ulimit -l unlimited, "operation not permitted".

1 Answers1

0

For others facing the issue: the problem was that I was trying to change mem lock limit from inside a Docker container.

Apparently, you can only change mem lock limit when spinning up the container:

  • docker run, use --ulimit option — see link and link;
  • Docker Compose, see link.