我正在本地 Windows 计算机上托管的 docker 容器上运行我的 redis 服务器,但由于此警告,我无法存储数据
WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
Run Code Online (Sandbox Code Playgroud)
有什么方法可以启用此功能吗?
version: '3'
services:
redis:
image: "redis"
ports:
- "6379:6379"
networks:
- my-service
networks:
my-service:
external: …Run Code Online (Sandbox Code Playgroud)