rustFS cross compiled for the Synology DS918+ (Intel J3455) on February 27th, 2026
971
From a clone of the RustFS project, I use this Dockefile
FROM rust:1.93-bookworm AS builder
# ── Outils ────────────────────────────────────────────────────────────────────
RUN apt-get update && apt-get install -y musl-tools protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN rustup target add x86_64-unknown-linux-musl
# ── Config Goldmont (unique, complète) ────────────────────────────────────────
WORKDIR /usr/src/rustfs
RUN mkdir -p .cargo && printf '[target."x86_64-unknown-linux-musl"]\n\
rustflags = [\n\
"-C", "target-cpu=goldmont",\n\
"-C", "target-feature=-avx,-avx2,-fma,-avx512f,-pclmulqdq,+sse4.2,+sse2,+sse3,+ssse3"\n\
]\n' > .cargo/config.toml
# ── Manifestes + patch SIMD ───────────────────────────────────────────────────
COPY Cargo.toml Cargo.lock ./
RUN sed -i 's/"reed-solomon-simd" *= *{ *version *= *"3.1.0" *}/reed-solomon-simd = { version = "3.1.0", default-features = false }/' Cargo.toml \
&& sed -i 's/base64-simd *= *{ *version *= *"0.8.0" *}/base64-simd = { version = "0.8.0", default-features = false }/' Cargo.toml \
&& sed -i 's/hex-simd *= *{ *version *= *"0.8.0" *}/hex-simd = { version = "0.8.0", default-features = false }/' Cargo.toml || true
# ── Sources ────────────────────────────────────────────────────────────────────
COPY crates/ ./crates/
COPY rustfs/ ./rustfs/
# ── Vendor + patch polyval force-soft ─────────────────────────────────────────
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
cargo vendor vendor/
RUN sed -i 's/^default = .*/default = ["force-soft"]/' vendor/polyval/Cargo.toml
# Ajoute la config vendor à la suite du config.toml existant
RUN printf '\n[source.crates-io]\nreplace-with = "vendored-sources"\n\n[source.vendored-sources]\ndirectory = "vendor"\n' \
>> .cargo/config.toml
# ── Build ──────────────────────────────────────────────────────────────────────
RUN set -eux; \
cargo run --bin gproto; \
CC_x86_64_unknown_linux_musl=musl-gcc \
cargo build --release \
--target x86_64-unknown-linux-musl \
--bin rustfs; \
cp target/x86_64-unknown-linux-musl/release/rustfs /tmp/rustfs
# ── Image finale ───────────────────────────────────────────────────────────────
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata binutils gdb
WORKDIR /app
COPY --from=builder /tmp/rustfs /usr/bin/rustfs
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /usr/bin/rustfs /entrypoint.sh
EXPOSE 9000 9001
VOLUME ["/data"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/rustfs"]
Content type
Image
Digest
sha256:51fd4008c…
Size
79.8 MB
Last updated
7 months ago
docker pull davidburet/rustfs-ds918plus