Browse Source

Update Dockerfile to install libsnappy-dev and to use current source code

Also, update Docker usage documentation.
fees
Roman Zeyde 6 years ago
parent
commit
bb8baf4108
No known key found for this signature in database GPG Key ID: 87CAE5FA46917CBB
  1. 3
      .dockerignore
  2. 11
      Dockerfile
  3. 5
      doc/usage.md

3
.dockerignore

@ -0,0 +1,3 @@
target/
.git/
_*/

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"]

5
doc/usage.md

@ -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…
Cancel
Save