2022-09-24 23:37:24 +00:00
|
|
|
FROM rust:alpine AS builder
|
2020-09-06 11:24:44 +00:00
|
|
|
|
2022-09-24 23:46:54 +00:00
|
|
|
RUN apk add python3 musl-dev pkgconfig openssl-dev make git
|
2020-09-06 11:24:44 +00:00
|
|
|
|
2022-09-24 23:37:24 +00:00
|
|
|
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
2020-09-06 11:24:44 +00:00
|
|
|
|
2022-09-24 23:37:24 +00:00
|
|
|
WORKDIR /opt/synapse-compressor/
|
2020-09-06 11:24:44 +00:00
|
|
|
|
2022-09-24 23:37:24 +00:00
|
|
|
RUN git clone https://github.com/matrix-org/rust-synapse-compress-state.git . && \
|
|
|
|
cargo build
|
|
|
|
|
|
|
|
WORKDIR /opt/synapse-compressor/synapse_auto_compressor/
|
|
|
|
|
|
|
|
RUN cargo build
|
|
|
|
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN apk add --no-cache libgcc
|
|
|
|
|
|
|
|
COPY --from=builder /opt/synapse-compressor/target/debug/synapse_compress_state /usr/local/bin/synapse_compress_state
|
|
|
|
COPY --from=builder /opt/synapse-compressor/target/debug/synapse_auto_compressor /usr/local/bin/synapse_auto_compressor
|