Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got error when using sysctls in docker-compose.yml #4498

Closed
reidlai opened this issue Feb 16, 2017 · 3 comments
Closed

Got error when using sysctls in docker-compose.yml #4498

reidlai opened this issue Feb 16, 2017 · 3 comments

Comments

@reidlai
Copy link

reidlai commented Feb 16, 2017

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 service setting in docker-compose.yml

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"

@reidlai
Copy link
Author

reidlai commented Feb 16, 2017

sorry I missed docker-compose file version

version: '2.1'
services:
es:
build:
...

@shin-
Copy link

shin- commented Feb 16, 2017

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.

@reidlai
Copy link
Author

reidlai commented Feb 17, 2017

it's my fault....vm.max_map_count should be set in RancherOS not at docker level. Please close this ticket. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants