Skip to content

Commit b4a51df

Browse files
committed
docs: updates to core and enterpirse Docker and CLi sections
1 parent 73d0040 commit b4a51df

File tree

1 file changed

+51
-54
lines changed

1 file changed

+51
-54
lines changed

influxdb/content.md

Lines changed: 51 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ You can pull docker images using these commands:
5353

5454
## Start InfluxDB 3 Core
5555

56-
Run InfluxDB 3 Core using either Docker Compose or the CLI.
56+
Run InfluxDB 3 Core using either Docker Compose or Docker CLI.
5757

5858
### Docker Compose
5959

60-
Create a `compose.yml` file with the configuration:
60+
To use Docker Compose with persistent storage, create a `compose.yml` file with the following configuration:
6161

6262
%%COMPOSE%%
6363

@@ -74,17 +74,26 @@ docker container ls --filter "name=influxdb3"
7474
docker kill <CONTAINER_ID>
7575
```
7676

77-
### Docker CLI
77+
### File system object store with docker
7878

79-
Run this command to start the InfluxDB 3 Core container:
79+
To start InfluxDB 3 Core with persistent storage and expose the default HTTP port (`8181`), run:
8080

8181
```bash
8282
docker run -d --name influxdb3-core \
8383
-p 8181:8181 \
84-
influxdb:3-core \
85-
serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3
84+
-v $PWD/influxdb3-data:/var/lib/influxdb3 \
85+
influxdb:3-core influxdb3 serve \
86+
--node-id my-influxdb-node \
87+
--object-store file \
88+
--data-dir /var/lib/influxdb3
8689
```
8790

91+
This command:
92+
93+
- Maps container port `8181` (HTTP API) to your host
94+
- Mounts the local `influxdb3-data` directory to persist data
95+
- Configures InfluxDB 3 Core to use a file system object store
96+
8897
Once the container is running, generate an admin token:
8998

9099
```bash
@@ -106,86 +115,74 @@ curl http://localhost:8181/health
106115

107116
## Start InfluxDB 3 Enterprise
108117

109-
InfluxDB 3 Enterprise supports clustered deployments and advanced features. To start a local standalone Enterprise container for testing, provide your license key as an environment variable.
118+
Use the InfluxDB 3 Enterprise Docker image to run a standalone or clustered instance. This section describes how to mount a file system object store using Docker CLI or Docker Compose.
110119

111120
### Docker Compose
112121

113-
Create a `compose.yml` file with the following configuration:
122+
To use Docker Compose, open your `compose.yml` file and define a service for InfluxDB 3 Enterprise.
123+
124+
```yaml
125+
services:
126+
influxdb3-enterprise:
127+
container_name: influxdb3-enterprise
128+
image: influxdb:3-enterprise
129+
ports:
130+
- 8181:8181
131+
command:
132+
- influxdb3
133+
- serve
134+
- --node-id=node0
135+
- --cluster-id=cluster0
136+
- --object-store=file
137+
- --data-dir=/var/lib/influxdb3
138+
- --plugin-dir=/var/lib/influxdb3-plugins
139+
environment:
140+
- INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS
141+
```
114142
115-
%%COMPOSE%%
143+
- Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt when generating a trial or at-home license.
116144

117145
Start your container:
118146

119147
```bash
120148
docker compose pull && docker compose run influxdb3-enterprise
121149
```
122150

123-
## Docker with mounted file style object store
124-
125-
Run this command to start the InfluxDB 3 Enterprise container
126-
127-
```bash
128-
docker run -d --name influxdb3-enterprise -p 8181:8181 \
129-
-v $PWD/plugins:/plugins \
130-
-v $PWD/data:/var/lib/influxdb3 \
131-
-e INFLUX_LICENSE_KEY="YOUR_LICENSE_KEY" \
132-
influxdb:enterprise serve \
133-
--cluster-id cluster1 \
134-
--node-id node1 \
135-
--plugin-dir /plugins \
136-
--object-store file \
137-
--data-dir /var/lib/influxdb3
138-
```
139-
140-
Generate an admin token:
141-
142-
```bash
143-
docker exec -it influxdb3-enterprise influxdb3 create token --admin
144-
```
151+
- InfluxDB 3 starts in a container with host port 8181 mapped to container port 8181, the server default for HTTP connections.
145152

146-
Use the token from the output to create a database.
153+
To stop your container run:
147154

148155
```bash
149-
docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token <your_admin_token>
156+
docker container ls --filter "name=influxdb3"
157+
docker kill <CONTAINER_ID>
150158
```
151159

152-
## Mount data to persist across restarts
160+
### File system object store with Docker
153161

154-
To retain data across container restarts, mount a Docker volume or bind a local directory. Be sure to include the required `serve` command and storage configuration.
155-
156-
### Using a Docker volume
157-
158-
To persist data using a Docker-managed volume, run the following command:
162+
To run the Docker image and persist data to the local file system, mount a volume for the object store.
159163

160164
```bash
161165
docker run -it \
162166
--volume /path/on/host:/path/in/container \
163-
influxdb:3-core influxdb3 serve \
167+
influxdb:3-enterprise influxdb3 serve \
164168
--node-id my_host \
169+
--cluster-id my_cluster \
165170
--object-store file \
166171
--data-dir /path/in/container
167172
```
168173

169-
This command:
170-
171-
- Creates or reuses a Docker volume named `influxdb3-data`.
172-
- Maps the default InfluxDB port (`8181`) to your local machine.
173-
- Starts the InfluxDB server with a required host ID and object store configuration.
174+
Generate an admin token:
174175

175-
### Using a local host directory
176+
```bash
177+
docker exec -it influxdb3-enterprise influxdb3 create token --admin
178+
```
176179

177-
To persist data in a local directory on your host, use the following command:
180+
Use the token from the output to create a database.
178181

179182
```bash
180-
docker run -d --name influxdb3-core \
181-
-v $PWD/influxdb3-data:/var/lib/influxdb3 \
182-
-p 8181:8181 \
183-
influxdb:3-core \
184-
serve --host-id my-influxdb-node --object-store file --data-dir /var/lib/influxdb3
183+
docker exec -it influxdb3-enterprise influxdb3 create database enterprise_db --token <your_admin_token>
185184
```
186185

187-
This mounts a local folder named `influxdb3-data` in your current working directory. Ensure that this directory exists and has appropriate write permissions.
188-
189186
# InfluxDB v2
190187

191188
## How to use the InfluxDB v2 Docker image

0 commit comments

Comments
 (0)