-
Notifications
You must be signed in to change notification settings - Fork 103
To let logstash to run as root in docker (managed by marathon) #86
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
Comments
I've already read the doc in But they do not solve my problem, and my docker image still runs as logstash in the container. Could anyone figure this out? |
You just need to override the entrypoint and just run logstash directly (the only thing gained by using the entrypoint is the drop down from root, which is what you don't want); so something like this: {
"id": "logstash",
"container": {
"type": "DOCKER",
"args": [ "-f", "/path/to/logstash.conf" ],
"docker": {
"image": "logstash:5",
"network": "BRIDGE",
"parameters": [
{ "key": "entrypoint", "value": "logstash" }
]
}
}
} |
OK I will try it next time You are also using mesos framework? Interesting... |
This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/logstash/current/docker.html). For more information, please see docker-library/elasticsearch#160, docker-library/docs#842, and docker-library/docs#945.
Thanks! |
First I changed the startup.option file, to let the following config items to be root user:
user and group id to be invoked as
LS_USER=root
LS_GROUP=root
But it does not take effect.
Then, I changed my marathon json file, to add parameter in docker config, but the runner is also logstash, not changed to root.
logstash 1 36.0 2.8 6103200 460876 ? Ssl 03:44 1:58 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSIni
root 105 0.0 0.0 22012 2280 ? Ss 03:47 0:00 /bin/bash
root 127 0.0 0.0 19180 1312 ? R+ 03:49 0:00 ps aux
The text was updated successfully, but these errors were encountered: