Update 'Dockerfile'
This commit is contained in:
parent
1e1be1f969
commit
47847c423b
1 changed files with 17 additions and 7 deletions
24
Dockerfile
24
Dockerfile
|
@ -1,11 +1,21 @@
|
|||
FROM rust:1.62.1 as builder
|
||||
FROM rust:alpine AS builder
|
||||
|
||||
RUN git clone https://github.com/matrix-org/rust-synapse-compress-state.git && \
|
||||
cargo install --path rust-synapse-compress-state
|
||||
RUN apk add python3 musl-dev pkgconfig openssl-dev make
|
||||
|
||||
FROM debian:buster-slim
|
||||
ENV RUSTFLAGS="-C target-feature=-crt-static"
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y postgresql-client
|
||||
WORKDIR /opt/synapse-compressor/
|
||||
|
||||
COPY --from=builder /usr/local/cargo/bin/synapse-compress-state /usr/local/bin/synapse-compress-state
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue