Monorepo for Tangled
Something went wrong. Try again.
896 B · 22 lines
1234567891011121314151617181920212223FROM rust:1.96-slim-trixie AS builderRUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates pkg-config perl make cmake clang mold \ && rm -rf /var/lib/apt/lists/*ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold"ARG BOBBIN_PROFILE=releaseWORKDIR /srcCOPY Cargo.toml Cargo.lock rust-toolchain.toml ./COPY lexicons ./lexiconsCOPY bobbin ./bobbinRUN cargo build --profile ${BOBBIN_PROFILE} --bin bobbin --package bobbinRUN if [ "${BOBBIN_PROFILE}" = "release" ]; then strip target/${BOBBIN_PROFILE}/bobbin; fiFROM debian:trixie-slimARG BOBBIN_PROFILE=releaseRUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ && rm -rf /var/lib/apt/lists/*COPY --from=builder /src/target/${BOBBIN_PROFILE}/bobbin /usr/local/bin/bobbinENV BOBBIN_BIND=0.0.0.0:8090EXPOSE 8090ENTRYPOINT ["/usr/local/bin/bobbin"]