Docker multi stage build: how to get just the cli out of the influxdb alpine image?


I’m currently using the Influxdb RUN commands from the docker alpine file to add influxdb cli functionality to my container (I need it to automate the backup process). To reduce image size I’m looking into a docker multi stage build setup. For this I’d like to just copy the bare essentials out of the Influxdb alpine image, meaning only the cli and none of the stuff required to run the database itself.

I was wondering if anyone could indicate what I need to get out of the container exactly to just get the cli? (so I can run backup commands the usual api commands)

Backup and restore functionality is part of the influxd binary, not the influx CLI, so unfortunately what you’re asking for isn’t possible.