mirror of
https://github.com/romanz/electrs.git
synced 2026-08-20 13:27:31 +02:00
Update Dockerfile to install libsnappy-dev and to use current source code
Also, update Docker usage documentation.
This commit is contained in:
parent
77ee699ed5
commit
bb8baf4108
3 changed files with 12 additions and 7 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
target/
|
||||
.git/
|
||||
_*/
|
||||
11
Dockerfile
11
Dockerfile
|
|
@ -1,14 +1,17 @@
|
|||
FROM rust:latest
|
||||
FROM rust:1.33.0-slim
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y clang cmake
|
||||
|
||||
RUN cargo install electrs
|
||||
RUN apt-get install -y libsnappy-dev
|
||||
|
||||
RUN adduser --disabled-login --system --shell /bin/false --uid 1000 user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
COPY ./ /home/user
|
||||
|
||||
RUN cargo build --release
|
||||
RUN cargo install --path .
|
||||
|
||||
# Electrum RPC
|
||||
EXPOSE 50001
|
||||
|
|
@ -17,5 +20,3 @@ EXPOSE 50001
|
|||
EXPOSE 4224
|
||||
|
||||
STOPSIGNAL SIGINT
|
||||
|
||||
CMD ["electrs", "-vvvv", "--timestamp"]
|
||||
|
|
|
|||
|
|
@ -122,9 +122,10 @@ $ electrum --oneserver --server=example:50002:s
|
|||
```bash
|
||||
$ docker build -t electrs-app .
|
||||
$ docker run --network host \
|
||||
--volume /home/roman/.bitcoin:/home/user/.bitcoin:ro \
|
||||
--volume $HOME/.bitcoin:/home/user/.bitcoin:ro \
|
||||
--volume $PWD:/home/user \
|
||||
--rm -i -t electrs-app
|
||||
--rm -i -t electrs-app \
|
||||
electrs -vvvv --timestamp --db-dir /home/user/db
|
||||
```
|
||||
|
||||
## Monitoring
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue