When I launch a Redis Docker image, I come across these warnings:
Among the solutions that I found on the Internet, this one covers everything, but when I try to use it in the Docker area (for example: changing the Docker file to use them), I get a "Read-only file system" error. A manual example gives me the same problems:
[ root@769368ed0fc5 /]# sysctl -w net.core.somaxconn=65535 sysctl: setting key "net.core.somaxconn": Read-only file system [ root@769368ed0fc5 /]# echo 'vm.overcommit_memory = 1' >> /etc/sysctl.conf [ root@769368ed0fc5 /]# sysctl vm.overcommit_memory=1 sysctl: setting key "vm.overcommit_memory": Read-only file system [ root@769368ed0fc5 /]# echo never > /sys/kernel/mm/transparent_hugepage/enabled bash: /sys/kernel/mm/transparent_hugepage/enabled: Read-only file system [ root@769368ed0fc5 /]# echo never > /sys/kernel/mm/transparent_hugepage/enabled bash: /sys/kernel/mm/transparent_hugepage/enabled: Read-only file system
Does anyone know how to fix it correctly ? I found many tricks to trick him, for example:
- Starting container in privileged mode
- Install host / proc inside container
- Use network stack (--net = host)
I want to know what is the correct way to handle this in Docker. Responses that provide a technical explanation of the proposed solution will be appreciated.
source share