Docker memory limits

Hi,

I’m trying to use the --memory and --memory-swap parameters of Docker to limit the container’s RAM/swap size.

For this to work Docker needs cgroups enabled in the Linux kernel. There’s explanations on the net for Ubuntu to set kernel parameters in GRUB_CMDLINE_LINUX in /etc/default/grub, update-grub and reboot to get this.

But now how do I do this on Travis and bionic ? I cannot reboot the VM, can I ?
Any other means to pass kernel parameters on first VM boot ?

1 Like

I’m encountering the reverse of this problem. I need to increase the memory limit of Docker containers, but there’s no way to achieve that.