diff --git a/docker-compose/elk-configure-host/Dockerfile b/docker-compose/elk-configure-host/Dockerfile index 03e2b378fe24a798c239ad9c87ffe1b1a64a4207..269032484ab8d9a03e1ef4ce006fd046eec1d203 100644 --- a/docker-compose/elk-configure-host/Dockerfile +++ b/docker-compose/elk-configure-host/Dockerfile @@ -1,4 +1,4 @@ FROM ubuntu:20.04 # Expand VM settings as required by ELK -CMD bash -c "if test $(sysctl -n vm.max_map_count) -lt 262144; then sysctl -w vm.max_map_count=262144; fi" +CMD bash -c "if [ -w /proc/sys/vm/max_map_count ] && [ $(cat /proc/sys/vm/max_map_count) -lt 262144 ]; then echo 262144 > /proc/sys/vm/max_map_count; fi"