Skip to content

Commit 14e812c

Browse files
committed
docs: update Docker instructions for InfluxDB 3 Core with correct run and storage configuration
1 parent 80c9604 commit 14e812c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

influxdb/content.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For full documentation, visit the [InfluxDB 3 documentation site](https://docs.i
1414

1515
## Start InfluxDB 3 Core
1616

17-
To run the influxDB 3 Core container:
17+
To run the InfluxDB 3 Core container:
1818

1919
```bash
2020
docker run -d --name influxdb3-core -p 8086:8086 influxdb:3
@@ -50,35 +50,39 @@ docker run -d --name influxdb3-enterprise -p 8086:8086 \
5050
--data-dir /var/lib/influxdb3
5151
```
5252

53-
Them, generate an admin token:
53+
Then, generate an admin token:
5454

5555
```bash
5656
docker exec -it influxdb3-enterprise influxdb3 create token --admin
5757
```
58-
Use the token from the output to create a database
58+
Use the token from the output to create a database.
5959

6060
```bash
6161
docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token <your_admin_token>
6262
```
6363

6464
## Mount data to persist across restarts
6565

66-
To persist the `/var/lib/influxdb3` directory in **InfluxDB 3 Core**, use a Docker volume:
66+
To persist **InfluxDB 3 Core** data across container restarts, mount a Docker volume or bind to a local directory. Be sure to include the required `serve` command and storage configuration.
67+
68+
### Using a Docker volume
6769

6870
```bash
6971
docker run -d --name influxdb3-core \
7072
-v influxdb3-data:/var/lib/influxdb3 \
7173
-p 8086:8086 \
72-
influxdb:3
74+
quay.io/influxdb/influxdb3:latest \
75+
serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3
7376
```
7477

75-
Or bind a to a local host directory:
78+
### Using a local host directory
7679

7780
```bash
7881
docker run -d --name influxdb3-core \
7982
-v $PWD/influxdb3-data:/var/lib/influxdb3 \
8083
-p 8086:8086 \
81-
influxdb:3
84+
quay.io/influxdb/influxdb3:latest \
85+
serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3
8286
```
8387

8488
Ensure the directory exists and has appropriate write permissions.

0 commit comments

Comments
 (0)