From 89035d3b3bb061942cbf92684b2be5042873e18c Mon Sep 17 00:00:00 2001 From: loverustfs Date: Thu, 3 Jul 2025 18:35:44 +0800 Subject: [PATCH 1/3] fix Dockerfile --- Dockerfile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index bdbf5f102..060107b85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,24 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM alpine:latest -# Install runtime dependencies -RUN apk add --no-cache \ +FROM alpine:3.18 AS builder + +RUN apk add -U --no-cache \ ca-certificates \ - tzdata \ - && rm -rf /var/cache/apk/* + curl \ + bash \ + unzip \ + a-certificates \ + +RUN curl -Lo /tmp/rustfs.zip https://dl.rustfs.com/artifacts/rustfs/rustfs-release-x86_64-unknown-linux-musl.latest.zip && \ + unzip /tmp/rustfs.zip -d /tmp && \ + mv /tmp/rustfs-release-x86_64-unknown-linux-musl/bin/rustfs /rustfs && \ + chmod +x /rustfs && \ + rm -rf /tmp/* -# Create data directories -RUN mkdir -p /data/rustfs +FROM alpine:3.18 - -# Copy binary based on target architecture -COPY target/*/release/rustfs \ - /usr/local/bin/rustfs - -RUN chmod +x /usr/local/bin/rustfs +COPY --from=builder /rustfs /usr/local/bin/rustfs ENV RUSTFS_ROOT_USER=rustfsadmin \ RUSTFS_ROOT_PASSWORD=rustfsadmin \ @@ -38,11 +40,9 @@ ENV RUSTFS_ROOT_USER=rustfsadmin \ RUSTFS_CONSOLE_ENABLE=true \ RUST_LOG=warn - -# Expose ports EXPOSE 9000 9001 +RUN mkdir -p /data VOLUME /data -# Set default command CMD ["rustfs", "/data"] From 65a731a243e39a835aa3b05c6512d4f53cdd7446 Mon Sep 17 00:00:00 2001 From: loverustfs Date: Thu, 3 Jul 2025 18:59:42 +0800 Subject: [PATCH 2/3] fix Dockerfile --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 060107b85..b9b5a6e09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. - FROM alpine:3.18 AS builder RUN apk add -U --no-cache \ ca-certificates \ curl \ bash \ - unzip \ - a-certificates \ + unzip RUN curl -Lo /tmp/rustfs.zip https://dl.rustfs.com/artifacts/rustfs/rustfs-release-x86_64-unknown-linux-musl.latest.zip && \ unzip /tmp/rustfs.zip -d /tmp && \ @@ -28,9 +26,12 @@ RUN curl -Lo /tmp/rustfs.zip https://dl.rustfs.com/artifacts/rustfs/rustfs-relea chmod +x /rustfs && \ rm -rf /tmp/* - FROM alpine:3.18 +RUN apk add -U --no-cache \ + ca-certificates \ + bash + COPY --from=builder /rustfs /usr/local/bin/rustfs ENV RUSTFS_ROOT_USER=rustfsadmin \ From 18933fdb58518f5e20270a7d5c9914eb9b7c8d45 Mon Sep 17 00:00:00 2001 From: loverustfs Date: Thu, 3 Jul 2025 19:11:44 +0800 Subject: [PATCH 3/3] Modify quickstart --- README.md | 12 +++++++++--- README_ZH.md | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7f8c50233..66391eee2 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,19 @@ Stress test server parameters To get started with RustFS, follow these steps: -1. **Install RustFS**: Download the latest release from our [GitHub Releases](https://github.com/rustfs/rustfs/releases). -2. **Run RustFS**: Use the provided binary to start the server. +1. **One-click installation script (Option 1)​​** ```bash - ./rustfs /data + curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh ``` +2. **Docker Quick Start (Option 2)​​** + + ```bash + podman run -d -p 9000:9000 -p 9001:9001 -v /data:/data quay.io/rustfs/rustfs + ``` + + 3. **Access the Console**: Open your web browser and navigate to `http://localhost:9001` to access the RustFS console. 4. **Create a Bucket**: Use the console to create a new bucket for your objects. 5. **Upload Objects**: You can upload files directly through the console or use S3-compatible APIs to interact with your RustFS instance. diff --git a/README_ZH.md b/README_ZH.md index 7112233e5..caa09edea 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -61,13 +61,19 @@ RustFS 是一个使用 Rust(全球最受欢迎的编程语言之一)构建 要开始使用 RustFS,请按照以下步骤操作: -1. **安装 RustFS**:从我们的 [GitHub Releases](https://github.com/rustfs/rustfs/releases) 下载最新版本。 -2. **运行 RustFS**:使用提供的二进制文件启动服务器。 +1. **一键脚本快速启动 (方案一)** ```bash - ./rustfs /data + curl -O https://rustfs.com/install_rustfs.sh && bash install_rustfs.sh ``` +2. **Docker快速启动(方案二)** + + ```bash + podman run -d -p 9000:9000 -p 9001:9001 -v /data:/data quay.io/rustfs/rustfs + ``` + + 3. **访问控制台**:打开 Web 浏览器并导航到 `http://localhost:9001` 以访问 RustFS 控制台。 4. **创建存储桶**:使用控制台为您的对象创建新的存储桶。 5. **上传对象**:您可以直接通过控制台上传文件,或使用 S3 兼容的 API 与您的 RustFS 实例交互。