-
Notifications
You must be signed in to change notification settings - Fork 0
[electrs-blockstream] add Dockerfile, set version to 0.1.0 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # ---- builder ---- | ||
| ARG RUST_VERSION=1.90.0 | ||
| FROM rust:${RUST_VERSION}-trixie AS builder | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| build-essential ca-certificates clang cmake curl g++ git libclang-dev make pkg-config \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| libbz2-dev liblz4-dev libsnappy-dev libzstd-dev zlib1g-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /src | ||
| ARG REPO=https://github.com/blockstream/electrs.git | ||
| #ARG REF=new-index | ||
| # pin latest commit of branch new-index | ||
| ARG REF=f1823d82b03dbd1dfef53f7b3611128dd2f4c1d2 | ||
|
|
||
| RUN git clone --filter=blob:none "${REPO}" . \ | ||
| && git fetch origin "${REF}" \ | ||
| && git checkout "${REF}" | ||
|
|
||
| # Build options: FEATURES="electrum-discovery,liquid" | ||
| # electrum-discovery -> discovery support | ||
| # liquid -> Elements/Liquid support | ||
| ARG FEATURES=electrum-discovery | ||
| RUN cargo build --locked --release --bin electrs --features "${FEATURES}" | ||
|
|
||
| # ---- runtime ---- | ||
| FROM debian:trixie-slim | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends ca-certificates libstdc++6 curl \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN useradd -r -d /var/lib/electrs -s /usr/sbin/nologin electrs \ | ||
| && mkdir -p /data && chown -R electrs:electrs /data | ||
|
|
||
| COPY --from=builder /src/target/release/electrs /usr/local/bin/electrs | ||
|
|
||
| USER electrs | ||
| VOLUME ["/data"] | ||
|
|
||
| # Electrum RPC and HTTP API | ||
| EXPOSE 50001 3000 | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/electrs"] | ||
| CMD ["--db-dir","/data","--electrum-rpc-addr","0.0.0.0:50001","--http-addr","0.0.0.0:3000"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| Electrs backend API optimized for public usage by Blockstream for the Esplora block explorer based on the re-implementation of romanz/electrs | ||
|
|
||
| - Blockstream/electrs: https://github.com/blockstream/electrs | ||
| - romanz/electrs https://github.com/romanz/electrs | ||
| - Blockstream/esplora https://github.com/Blockstream/esplora | ||
|
|
||
|
|
||
| Alternative image sources: | ||
| - https://github.com/getumbrel/docker-electrs (using romanz/electrs) | ||
| - https://github.com/mempool/electrs (based on romanz/electrs and Blockstream/electrs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 0.1.0 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'trixie-slim' without a specific version tag can lead to unpredictable builds when Debian releases change. Consider pinning to a specific Debian version (e.g., 'debian:12-slim' for bookworm) to ensure reproducible builds.