forked from Blockstream/electrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Blockstream#20 from mempool/docker_build
Initial Docker support
- Loading branch information
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 @@ | ||
Dockerfile |
This file contains 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,21 @@ | ||
FROM debian:bookworm-slim AS base | ||
|
||
RUN apt update -qy | ||
RUN apt install -qy librocksdb-dev | ||
|
||
FROM base as build | ||
|
||
RUN apt install -qy git cargo clang cmake | ||
|
||
WORKDIR /build | ||
COPY . . | ||
|
||
RUN cargo build --release --bin electrs | ||
|
||
FROM base as deploy | ||
|
||
COPY --from=build /build/target/release/electrs /bin/electrs | ||
|
||
EXPOSE 50001 | ||
|
||
ENTRYPOINT ["/bin/electrs"] |
This file contains 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,24 @@ | ||
version: '3.9' | ||
services: | ||
|
||
mempool-electrs: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: on-failure | ||
|
||
ports: | ||
- 50001:50001 | ||
|
||
entrypoint: | ||
/bin/electrs | ||
command: | | ||
--address-search | ||
--cookie mempool:mempool | ||
--db-dir /electrs | ||
--cors '*' | ||
volumes: | ||
- 'electrs_data:/electrs' | ||
|
||
volumes: | ||
electrs_data: |
Empty file.