Influxdb multi-arch docker image based on alpine, cloud ready, fully configurable through env.
100K+
influxdb based on the official influxdb images, multiple architectures (amd64,arm64/v8), cloud ready, fully configurable through environment
The image is now using non-alpine base images and a small go utility (toml_update) to read, modify and write a valid toml configuration file.
# before
entrypoint_cmd=/entrypoint.sh
conf_templates="influxdb.conf.tmpl:/etc/influxdb/influxdb.conf"
conf_var_prefix=IFX_
# can be overwritten, to add names or to reorder names
conf_vars_influxconf=${conf_vars_influxconf:-'IFX_GLOBAL IFX_META IFX_DATA IFX_COORDINATOR IFX_RETENTION IFX_SHARD-PRECREATION IFX_MONITOR IFX_SUBSCRIBER IFX_HTTP IFX_GRAPHITE IFX_COLLECTD IFX_OPENTSDB IFX_UDP IFX_CONTINUOUS_QUERIES'}
IFX_GLOBAL=reporting-disabled = false
IFX_COORDINATOR=[coordinator]
IFX_COORDINATOR_BASE=write-timeout = "30s"\nmax-concurrent-queries = 10\nquery-timeout = "600s"\nlog-queries-after = "10s"
# after
CONF_UPDATE=/etc/influxdb/influxdb.conf
CONF_PREFIX=IFX
IFX_GLOBAL1=reporting-disabled=false
IFX_COORDINATOR1=coordinator.write-timeout="30s"
IFX_COORDINATOR2=coordinator.max-concurrent-queries=10
IFX_COORDINATOR3=coordinator.query-timeout="600s"
IFX_COORDINATOR_WHATEVER=coordinator.log-queries-after="10s"
Try it in 3 steps
docker run --rm -it drpsychick/influxdb:latest cat /default.env > influxdb.env
# check default configuration:
docker run --rm -it --env-file influxdb.env --name influxdb-1 drpsychick/influxdb:latest influxd config
Edit settings in influxdb.env to your needs:
= unless in quotesIFX_GLOBAL=reporting-disabled=true
Run in a separate teminal
docker run --rm -it --env-file influxdb.env --name influxdb-1 drpsychick/influxdb:latest --test
docker run --rm -it --env-file influxdb.env --name influxdb-1 --publish 8086:8086 drpsychick/influxdb:latest
Test the connection
curl http://localhost:8086/query --data-urlencode "q=SHOW DATABASES"
You can use any IFX_ variable in your influxdb.env. They will be added to the config during container startup.
IFX_VAR1=coordinator.write-timeout="30s"
IFX_ANY_OTHER_NAME=coordinator.max-concurrent-queries=10
Beware:
Docker only support simple variables. No ", no ' and especially no newlines in variables.
Content type
Image
Digest
sha256:9f01a1360…
Size
121.4 MB
Last updated
2 days ago
docker pull drpsychick/influxdb