Closed AddoSolutions closed 8 years ago
Is this for telegraf?
/cc @sparrc
@jsternberg Apologies, yes that is the case!
the ipmi_sensors plugin depends on ipmitool, maybe it's just a documentation issue for telegraf.
@sparrc That is correct, but the problem is that the docker image needs access to ipmitool
in order to use that plugin as said. There is no good way to install ipmitool without it being a part of the docker image.
I am suggesting adding that line above to the Dockerfile
itself
@AddoSolutions I'm not sure if we should be installing other tools to be used with specific plugins as part of the base telegraf image. If there's substantial interest, we can publish plugin images for it being easier for users. At the moment though, you can just build a new docker image from the base image and it would be simple to have that image install the ipmitool.
We don't want to cause a substantial amount of bloat for people who are using the telegraf image for something else.
+1, we don't want to bloat the image with external packages. Telegraf attempts to avoid having external package dependencies but occasionally that's not possible, as in the case of ipmitool
@jsternberg I agree with that, creating too big of an image would be a bummer. Do you think though that as the ipmi tools are part of the core telegraf package, that it should work?
Like, if this were some obscure plugin that one has to install, I can see that, but I would think that a core plugin to telegraf would be supported?
I'm facing the same problem, how can I add it to the docker compose?
I don't work at influxdata anymore and don't maintain the images, but something I've done when I need to modify an upstream image with docker compose is to do something like the following.
Add a Dockerfile
somewhere in your compose structure. Since my personal thing is fairly small, I just keep it in Dockerfile
but you can customize this to be anywhere you want. Here's an example of me modifying the eclipse-mosquitto
image to add a custom configuration file.
FROM docker.io/library/eclipse-mosquitto AS docker.io/jsternberg/mosquitto
COPY ./mosquitto/mosquitto.conf /mosquitto/config/mosquitto.conf
Then in docker compose:
services:
mqtt:
image: docker.io/jsternberg/mosquitto
build:
target: docker.io/jsternberg/mosquitto
Whenever you make a change, you might need to do docker compose up -d --build
to rebuild the image. It doesn't seem to do that automatically. If you're just doing things locally, then this should be good enough. If you're running this in a large number of places, it might be worth building the image in CI and then pulling it down so you aren't using the storage resources from the builder cache on a production machine. I think the design is you can use the same compose file for dev or production but, in production, you omit the --build
flag.
Whenever I use the IPMITool plugin, it fails with:
This is simply a matter of adding something like this to the dockerfile:
Is there a better way of doing this?