influx cli with docker container

ww‮.w‬lautturi.com
influx cli with docker container

To use the InfluxDB command-line interface (CLI) in a Docker container, you can follow these steps:

  1. Pull the InfluxDB Docker image from the Docker registry:
docker pull influxdb
  1. Run the InfluxDB Docker container, making sure to map the 8086 port to a host port:
docker run -p 8086:8086 --name influxdb influxdb
  1. Connect to the InfluxDB container using the docker exec command:
docker exec -it influxdb influx

This will open the InfluxDB CLI inside the Docker container. From here, you can use the InfluxDB CLI commands to interact with the InfluxDB instance running inside the container.

For example, you can use the SHOW DATABASES command to list the databases in the instance:

> SHOW DATABASES

Or you can use the USE command to switch to a specific database:

> USE my_database

For more information on using the InfluxDB CLI, you can refer to the InfluxDB documentation.

Created Time:2017-11-03 23:27:13  Author:lautturi