-
Notifications
You must be signed in to change notification settings - Fork 71
improve code for docker install #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -22,7 +22,7 @@ RustFS 是一款高性能、100% 兼容 S3 的开源分布式对象存储系统 | |||
| * 本地路径 `/mnt/rustfs/data`(或自定义路径)用于挂载对象数据 | ||||
| 2. **网络与防火墙** | ||||
|
|
||||
| * 确保宿主机 7000 端口对外开放(或自定义端口一致) | ||||
| * 确保宿主机 9000 端口对外开放(或自定义端口一致) | ||||
| 3. **配置文件准备** | ||||
|
|
||||
| * 在宿主机 `/etc/rustfs/config.toml` 中,定义监听端口、管理员账号、数据路径等(详见第四节) | ||||
|
|
@@ -34,12 +34,12 @@ RustFS 是一款高性能、100% 兼容 S3 的开源分布式对象存储系统 | |||
| 使用官方 Ubuntu 基础镜像,快束拉取 RustFS 官方镜像: | ||||
|
|
||||
| ```bash | ||||
| podman pull quay.io/rustfs/rustfs | ||||
| docker pull quay.io/rustfs/rustfs | ||||
| ``` | ||||
|
|
||||
| 或者使用 docker 拉取: | ||||
| ```bash | ||||
| podman pull docker://rustfs/rustfs | ||||
| docker pull docker://rustfs/rustfs | ||||
|
|
||||
| ``` | ||||
|
|
||||
|
|
@@ -53,11 +53,11 @@ podman pull docker://rustfs/rustfs | |||
| RUSTFS_ROOT_USER=rustfsadmin | ||||
| RUSTFS_ROOT_PASSWORD=rustfsadmin | ||||
| RUSTFS_VOLUMES="/data/rustfs{0...3}" | ||||
| RUSTFS_ADDRESS=":7000" | ||||
| RUSTFS_ADDRESS=":9000" | ||||
| #RUSTFS_SERVER_DOMAINS="play.rustfs.com:7000" | ||||
| RUSTFS_CONSOLE_ENABLE=true | ||||
| RUSTFS_CONSOLE_ADDRESS=":7001" | ||||
| RUSTFS_OBS_CONFIG="/etc/default/obs.toml" | ||||
| RUSTFS_CONSOLE_ADDRESS=":9001" | ||||
| RUSTFS_OBS_ENDPOINT="" | ||||
| RUSTFS_TLS_PATH="/opt/tls" | ||||
| ``` | ||||
|
|
||||
|
|
@@ -70,24 +70,128 @@ RUSTFS_TLS_PATH="/opt/tls" | |||
| RustFS SNSD Docker 运行方式,结合上述镜像与配置,执行: | ||||
|
|
||||
| ```bash | ||||
| podman run -d \ | ||||
| --name rustfs_local \ | ||||
| -p 7000:7000 \ | ||||
| -v /mnt/rustfs/data:/data \ | ||||
| -v /etc/rustfs/rustfs:/config/rustfs:ro \ | ||||
| rustfs/rustfs:latest | ||||
| docker run -d \ | ||||
| --name rustfs_local \ | ||||
| -p 9000:9000 \ | ||||
| -p 9001:9001 \ | ||||
| -v /mnt/rustfs/data:/data \ | ||||
| rustfs/rustfs:latest \ | ||||
| /data | ||||
| ``` | ||||
|
|
||||
| 各参数说明: | ||||
|
|
||||
| * `-p 7000:7000`:映射宿主机 7000 端口到容器 | ||||
| * `-p 9000:9000`:映射宿主机 9000 端口到容器 | ||||
| * `-p 9001:9001`:映射宿主机 9001 端口到容器,用于 console 端访问 | ||||
| * `-v /mnt/rustfs/data:/data`:挂载数据卷 | ||||
| * `-v /etc/rustfs/rustfs:/config/rustfs:ro`:挂载配置文件 | ||||
| * `--name rustfs_local`:容器自定义名称 | ||||
| * `-d`: 后台运行 | ||||
| * `-d`:后台运行 | ||||
|
|
||||
| --- | ||||
|
|
||||
| ### 完整参数配置示例 | ||||
|
|
||||
| ```bash | ||||
| docker run -d \ | ||||
| --name rustfs_container \ | ||||
| -p 9000:9000 \ | ||||
| -p 9001:9001 \ | ||||
| -v /mnt/rustfs/data:/data \ | ||||
| -e RUSTFS_ACCESS_KEY=myaccesskey \ | ||||
| -e RUSTFS_SECRET_KEY=mysecretkey \ | ||||
| -e RUSTFS_CONSOLE_ENABLE=true \ | ||||
| -e RUSTFS_SERVER_DOMAINS=example.com \ | ||||
| rustfs/rustfs:latest \ | ||||
| ./target/debug/rustfs \ | ||||
|
||||
| ./target/debug/rustfs \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Using
docker://syntax is non-standard for Docker CLI. Recommend simplifying todocker pull rustfs/rustfsordocker pull quay.io/rustfs/rustfs.