Have added es service in docker-compose. No error during build time but got run error "error: sysctl vm.max_map_count is not in a separate kernel namespace". My docker version is 1.12.6 bundled with RancherOS and docker-compose is 1.11.1. I also tried array format but same error.
es:
build:
context: ./xyz-elasticsearch
dockerfile: Dockerfile
image: xyz-elasticsearch
sysctls:
vm.max_map_count: 262144
ports:
- 9200:9200
- 9300:9300
volumes:
- /tmp/elasticsearch/data:/usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: "-Xms1g -Xmx1g"
sorry I missed docker-compose file version
version: '2.1'
services:
es:
build:
...
Related: https://github.com/docker/runc/blob/master/libcontainer/configs/validate/validator.go#L110-L149
Try adding privileged: true
if you need to set this, but be aware of the security implications.
At any rate, this is not a Compose issue - if you need more help, please use our support channels.
it's my fault....vm.max_map_count should be set in RancherOS not at docker level. Please close this ticket. Thanks.
Most helpful comment
it's my fault....vm.max_map_count should be set in RancherOS not at docker level. Please close this ticket. Thanks.