This repository has no description
959 B
25 lines
1FROM rust:1.96-slim-trixie AS builder
2RUN apt-get update && apt-get install -y --no-install-recommends \
3 ca-certificates pkg-config perl make cmake clang mold \
4 && rm -rf /var/lib/apt/lists/*
5ENV RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold"
6ARG BOBBIN_PROFILE=release
7WORKDIR /src
8COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
9COPY lexicons ./lexicons
10COPY crates ./crates
11COPY knot2 ./knot2
12COPY bobbin ./bobbin
13COPY shuttle ./shuttle
14RUN cargo build --profile ${BOBBIN_PROFILE} --bin bobbin --package bobbin
15RUN if [ "${BOBBIN_PROFILE}" = "release" ]; then strip target/${BOBBIN_PROFILE}/bobbin; fi
16
17FROM debian:trixie-slim
18ARG BOBBIN_PROFILE=release
19RUN apt-get update && apt-get install -y --no-install-recommends \
20 ca-certificates \
21 && rm -rf /var/lib/apt/lists/*
22COPY --from=builder /src/target/${BOBBIN_PROFILE}/bobbin /usr/local/bin/bobbin
23ENV BOBBIN_BIND=0.0.0.0:8090
24EXPOSE 8090
25ENTRYPOINT ["/usr/local/bin/bobbin"]