@@ -32,13 +32,13 @@ This document is based on the official RustFS Linux binary package, creating a c
32
32
Using the official Ubuntu base image, quickly pull the official RustFS image:
33
33
34
34
``` bash
35
- podman pull quay.io/rustfs/rustfs
35
+ docker pull quay.io/rustfs/rustfs
36
36
```
37
37
38
38
Or use docker to pull:
39
39
40
40
``` bash
41
- podman pull docker:// rustfs/rustfs
41
+ docker pull rustfs/rustfs
42
42
```
43
43
44
44
---
@@ -48,8 +48,8 @@ podman pull docker://rustfs/rustfs
48
48
Create configuration file ` /etc/rustfs/config.toml ` on the host, example content:
49
49
50
50
``` bash
51
- RUSTFS_ROOT_USER =rustfsadmin
52
- RUSTFS_ROOT_PASSWORD =rustfsadmin
51
+ RUSTFS_ACCESS_KEY =rustfsadmin
52
+ RUSTFS_SECRET_KEY =rustfsadmin
53
53
RUSTFS_VOLUMES=" /data/rustfs{0...3}"
54
54
RUSTFS_ADDRESS=" :7000"
55
55
# RUSTFS_SERVER_DOMAINS="play.rustfs.com:7000"
@@ -68,11 +68,10 @@ RUSTFS_TLS_PATH="/opt/tls"
68
68
RustFS SNSD Docker runtime method, combining the above image and configuration, execute:
69
69
70
70
``` bash
71
- podman run -d \
71
+ docker run -d \
72
72
--name rustfs_local \
73
73
-p 7000:7000 \
74
74
-v /mnt/rustfs/data:/data \
75
- -v /etc/rustfs/rustfs:/config/rustfs:ro \
76
75
rustfs/rustfs:latest
77
76
```
78
77
@@ -86,6 +85,110 @@ Parameter descriptions:
86
85
87
86
---
88
87
88
+ ### Complete parameter configuration example
89
+
90
+ ``` bash
91
+ docker run -d \
92
+ --name rustfs_container \
93
+ -p 9000:9000 \
94
+ -p 9001:9001 \
95
+ -v /mnt/rustfs/data:/data \
96
+ -e RUSTFS_ACCESS_KEY=myaccesskey \
97
+ -e RUSTFS_SECRET_KEY=mysecretkey \
98
+ -e RUSTFS_CONSOLE_ENABLE=true \
99
+ -e RUSTFS_SERVER_DOMAINS=example.com \
100
+ rustfs/rustfs:latest \
101
+ --address :9000 \
102
+ --console-address :9001 \
103
+ --console-enable \
104
+ --server-domains example.com \
105
+ --access-key myaccesskey \
106
+ --secret-key mysecretkey \
107
+ /data
108
+ ```
109
+
110
+ ### Parameter description and corresponding method
111
+
112
+ 1 . ** Environment variable method** (recommended):
113
+ ``` bash
114
+ -e RUSTFS_ADDRESS=:9000 \
115
+ -e RUSTFS_SERVER_DOMAINS=example.com \
116
+ -e RUSTFS_ACCESS_KEY=myaccesskey \
117
+ -e RUSTFS_SECRET_KEY=mysecretkey \
118
+ -e RUSTFS_CONSOLE_ENABLE=true \
119
+ -e RUSTFS_CONSOLE_ADDRESS=:9001 \
120
+ ```
121
+
122
+ 2 . ** Command line parameter method** :
123
+ ```
124
+ --address :9000 \
125
+ --server-domains example.com \
126
+ --access-key myaccesskey \
127
+ --secret-key mysecretkey \
128
+ --console-enable \
129
+ --console-address :9001 \
130
+ ```
131
+
132
+ 3 . ** Required parameters** :
133
+ - ` <VOLUMES> ` : Specify at the end of the command, ` /data `
134
+
135
+ ### Common configuration combinations
136
+
137
+ 1 . ** Basic Configuration** :
138
+ ``` bash
139
+ docker run -d \
140
+ -p 9000:9000 \
141
+ -v /mnt/data:/data \
142
+ rustfs/rustfs:latest \
143
+ /data
144
+ ```
145
+
146
+ 2 . ** Enable console** :
147
+ ``` bash
148
+ docker run -d \
149
+ -p 9000:9000 \
150
+ -p 9001:9001 \
151
+ -v /mnt/data:/data \
152
+ -e RUSTFS_CONSOLE_ENABLE=true \
153
+ rustfs/rustfs:latest \
154
+ ./target/debug/rustfs \
155
+ --console-enable \
156
+ /data
157
+ ```
158
+
159
+ 3 . ** Custom authentication key** :
160
+ ``` bash
161
+ docker run -d \
162
+ -p 9000:9000 \
163
+ -v /mnt/data:/data \
164
+ -e RUSTFS_ACCESS_KEY=admin123 \
165
+ -e RUSTFS_SECRET_KEY=secret123 \
166
+ rustfs/rustfs:latest \
167
+ ./target/debug/rustfs \
168
+ --access-key admin123 \
169
+ --secret-key secret123 \
170
+ /data
171
+ ```
172
+
173
+ ### Things to note
174
+
175
+ 1 . The port mapping must correspond to:
176
+ - Service port default 9000(` -p 9000:9000 ` )
177
+ - Console port default 9001(` -p 9001:9001 ` )
178
+
179
+ 2 . Data volumes should be persisted:
180
+ - ` -v /host/path:/container/path `
181
+
182
+ 3 . Environment variables and command line parameters can be used in a mixed manner, but command line parameters have higher priority
183
+
184
+ 4 . If using TLS, additional certificate paths are required:
185
+ ``` bash
186
+ -v /path/to/certs:/certs \
187
+ -e RUSTFS_TLS_PATH=/certs \
188
+ ```
189
+
190
+
191
+
89
192
## 5. Verification and Access
90
193
91
194
1 . ** Check container status and logs:**
0 commit comments