From 74bf4909c80c1d8e7743be710ad5dcbb5c2692fa Mon Sep 17 00:00:00 2001 From: loverustfs Date: Tue, 15 Jul 2025 23:17:39 +0800 Subject: [PATCH] Modify docker source file --- .github/workflows/docker.yml | 6 +++--- Dockerfile | 3 --- Dockerfile.source | 13 +++++-------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c5b4913..85eb7547 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -223,9 +223,9 @@ jobs: - name: production dockerfile: Dockerfile platforms: linux/amd64,linux/arm64 - #- name: source - # dockerfile: Dockerfile.source - # platforms: linux/amd64,linux/arm64 + - name: source + dockerfile: Dockerfile.source + platforms: linux/amd64,linux/arm64 #- name: dev # dockerfile: Dockerfile.source # platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index 10167a0e..4d7a7724 100644 --- a/Dockerfile +++ b/Dockerfile @@ -121,9 +121,6 @@ WORKDIR /data # Expose port EXPOSE 9000 -# Health check -HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=40s \ - CMD curl -f http://localhost:9000/health || exit 1 # Volume for data VOLUME ["/data"] diff --git a/Dockerfile.source b/Dockerfile.source index ab1654bd..fbc482d7 100644 --- a/Dockerfile.source +++ b/Dockerfile.source @@ -19,11 +19,11 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* # Install sccache for Rust compilation caching -RUN wget https://github.com/mozilla/sccache/releases/download/v0.8.1/sccache-v0.8.1-x86_64-unknown-linux-gnu.tar.gz \ - && tar -xzf sccache-v0.8.1-x86_64-unknown-linux-gnu.tar.gz \ - && mv sccache-v0.8.1-x86_64-unknown-linux-gnu/sccache /usr/local/bin/ \ +RUN wget https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-dist-v0.10.0-x86_64-unknown-linux-musl.tar.gz \ + && tar -xzf sccache-dist-v0.10.0-x86_64-unknown-linux-musl.tar.gz \ + && mv sccache-dist-v0.10.0-x86_64-unknown-linux-musl/sccache-dist /usr/local/bin/sccache \ && chmod +x /usr/local/bin/sccache \ - && rm -rf sccache-v0.8.1-x86_64-unknown-linux-gnu.tar.gz sccache-v0.8.1-x86_64-unknown-linux-gnu + && rm -rf sccache-dist-v0.10.0-x86_64-unknown-linux-musl.tar.gz sccache-dist-v0.10.0-x86_64-unknown-linux-musl # Set up sccache environment ENV RUSTC_WRAPPER=sccache \ @@ -63,7 +63,7 @@ ENV CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ WORKDIR /usr/src/rustfs # Copy cargo configuration for optimized builds -COPY cargo.config.toml ./.cargo/config.toml +COPY Cargo.toml ./.cargo/config.toml # Copy Cargo files for dependency caching COPY Cargo.toml Cargo.lock ./ @@ -147,9 +147,6 @@ ENV RUSTFS_ACCESS_KEY=rustfsadmin \ RUSTFS_VOLUMES=/data \ RUST_LOG=warn -# Health check -HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD wget --no-verbose --tries=1 --spider http://localhost:9000/health || exit 1 # Volume for data VOLUME ["/data"]