File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
content/shared/influxdb3-get-started Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-
457
457
{{% tabs %}}
458
458
[ Environment variable (recommended)] ( # )
459
459
[ Command option] ( # )
460
+ [ Docker] ( # )
460
461
{{% /tabs %}}
461
462
{{% tab-content %}}
462
463
@@ -479,6 +480,31 @@ influxdb3 show databases --token YOUR_AUTH_TOKEN
479
480
```
480
481
{{% /code-placeholders %}}
481
482
483
+ {{% /tab-content %}}
484
+ {{% tab-content %}}
485
+
486
+ Run the CLI in a Docker container using the ` INFLUXDB3_AUTH_TOKEN ` environment variable:
487
+
488
+ {{% code-placeholders "YOUR_AUTH_TOKEN" %}}
489
+ ``` bash
490
+ docker run --rm \
491
+ -e INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN \
492
+ quay.io/influxdb/influxdb3:latest \
493
+ query \
494
+ --host http://host.docker.internal:8181 \
495
+ --database example_db \
496
+ " SHOW TABLES"
497
+ ```
498
+ {{% /code-placeholders %}}
499
+
500
+ > [ !Note]
501
+ > Ensure that the database ` example_db ` exists in the running container.
502
+ > To create it, run:
503
+ >
504
+ > ``` bash
505
+ > docker exec -it influxdb3-core influxdb3 create database example_db --token YOUR_AUTH_TOKEN
506
+ > ` ` `
507
+
482
508
{{% /tab-content %}}
483
509
{{< /tabs-wrapper > }}
484
510
You can’t perform that action at this time.
0 commit comments