1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00

Use rust:1.41.1-slim for faster builds

This commit is contained in:
Roman Zeyde 2020-12-03 18:28:33 +02:00
parent f12bbf5a36
commit 32d8d13f39
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -1,3 +1,16 @@
### Electrum Rust Server ###
FROM rust:1.41.1-slim as electrs-build
RUN apt-get update
RUN apt-get install -qq -y clang cmake
RUN rustup component add rustfmt
# Build, test and install electrs
WORKDIR /build/electrs
COPY . .
RUN cargo fmt -- --check
RUN cargo build --locked --release --all
RUN cargo test --locked --release --all
FROM debian:buster-slim as updated FROM debian:buster-slim as updated
RUN apt-get update RUN apt-get update
# Install Bitcoin Core runtime dependencies # Install Bitcoin Core runtime dependencies
@ -19,17 +32,6 @@ RUN ./autogen.sh
RUN ./configure --disable-tests --disable-wallet --disable-bench --without-gui --without-miniupnpc RUN ./configure --disable-tests --disable-wallet --disable-bench --without-gui --without-miniupnpc
RUN make -j"$(($(nproc)+1))" RUN make -j"$(($(nproc)+1))"
### Electrum Rust Server ###
FROM updated as electrs-build
# Install Rust 1.41.1
RUN apt-get install -qq -y clang cmake cargo rustc
# Build, test and install electrs
WORKDIR /build/electrs
COPY . .
RUN cargo build --locked --release --all
RUN cargo test --locked --release --all
FROM updated as result FROM updated as result
### Electrum ### ### Electrum ###
# Download latest Electrum wallet # Download latest Electrum wallet