Skip to content

Commit b03af14

Browse files
committed
docs(core, enterprise): add token auth + Docker examples
1 parent 7caa211 commit b03af14

File tree

1 file changed

+26
-0
lines changed
  • content/shared/influxdb3-get-started

1 file changed

+26
-0
lines changed

content/shared/influxdb3-get-started/setup.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-
457457
{{% tabs %}}
458458
[Environment variable (recommended)](#)
459459
[Command option](#)
460+
[Docker](#)
460461
{{% /tabs %}}
461462
{{% tab-content %}}
462463

@@ -479,6 +480,31 @@ influxdb3 show databases --token YOUR_AUTH_TOKEN
479480
```
480481
{{% /code-placeholders %}}
481482

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+
482508
{{% /tab-content %}}
483509
{{< /tabs-wrapper >}}
484510

0 commit comments

Comments
 (0)