From fc8931d69f32af35cb97039107b4f2ff115b6c75 Mon Sep 17 00:00:00 2001 From: houseme Date: Fri, 18 Jul 2025 11:05:00 +0800 Subject: [PATCH] improve code for dockerfile (#253) * improve code for dockerfile * Update Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 702482b0..18c72c81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,8 +77,6 @@ LABEL name="RustFS" \ # Install runtime dependencies RUN apk add --no-cache \ ca-certificates \ - curl \ - tzdata \ bash \ && addgroup -g 1000 rustfs \ && adduser -u 1000 -G rustfs -s /bin/sh -D rustfs @@ -89,7 +87,9 @@ ENV RUSTFS_ACCESS_KEY=rustfsadmin \ RUSTFS_ADDRESS=":9000" \ RUSTFS_CONSOLE_ENABLE=true \ RUSTFS_VOLUMES=/data \ - RUST_LOG=warn + RUST_LOG=warn \ +# Directory where RustFS stores observability logs. Ensure this path exists and has appropriate permissions. + RUSTFS_OBS_LOG_DIRECTORY=/logs # Set permissions for /usr/bin (similar to MinIO's approach) RUN chmod -R 755 /usr/bin @@ -102,7 +102,7 @@ COPY --from=build /build/rustfs /usr/bin/ RUN chmod +x /usr/bin/rustfs # Create data directory -RUN mkdir -p /data /config && chown -R rustfs:rustfs /data /config +RUN mkdir -p /data /logs && chown -R rustfs:rustfs /data /logs # Switch to non-root user USER rustfs