forked from Blockstream/esplora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.deps
49 lines (41 loc) · 2.27 KB
/
Dockerfile.deps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM debian:buster@sha256:d986a531d62903b66e731d475988f5b2ba3a4a90078078cb0f29f9685ee36466
SHELL ["/bin/bash", "-c"]
RUN mkdir -p /srv/explorer \
&& apt-get -yqq update \
&& apt-get -yqq upgrade \
&& apt-get -yqq install clang cmake curl git tor
RUN git clone --quiet --depth 1 --single-branch --branch v0.33.11 https://github.com/creationix/nvm.git /root/.nvm \
&& rm -rf /root/.nvm/.git \
&& source /root/.nvm/nvm.sh \
&& nvm install v8.11.4
ENV SHA256SUM_BITCOINCORE=732cc96ae2e5e25603edf76b8c8af976fe518dd925f7e674710c6c8ee5189204
RUN curl -sL -o bitcoin.tar.gz https://bitcoincore.org/bin/bitcoin-core-0.19.0.1/bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz \
&& echo "${SHA256SUM_BITCOINCORE} bitcoin.tar.gz" | sha256sum --check \
&& tar xzf bitcoin.tar.gz -C /srv/explorer \
&& ln -s /srv/explorer/bitcoin-0.19.0.1 /srv/explorer/bitcoin \
&& rm bitcoin.tar.gz
ENV SHA256SUM_ELEMENTS=6ab9dfd9c8818aa2d6789539eeaa6914692b5852fbb2fba603f3077a2bb5d9a0
RUN curl -sL -o elements.tar.gz https://github.com/ElementsProject/elements/releases/download/elements-0.18.1.5/elements-0.18.1.5-x86_64-linux-gnu.tar.gz \
&& echo "${SHA256SUM_ELEMENTS} elements.tar.gz" | sha256sum --check \
&& tar xzf elements.tar.gz -C /srv/explorer \
&& ln -s /srv/explorer/elements-0.18.1.5 /srv/explorer/liquid \
&& mv /srv/explorer/liquid/bin/{elementsd,liquidd} \
&& mv /srv/explorer/liquid/bin/{elements-cli,liquid-cli} \
&& rm elements.tar.gz
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.41.0 \
&& source /root/.cargo/env \
&& mkdir -p /srv/explorer/electrs{,_liquid} \
&& git clone --no-checkout https://github.com/blockstream/electrs.git \
&& cd electrs \
&& git checkout 49cf7a7dffe8dccb3d4c5cb543aa05878abf086b \
&& cp contrib/popular-scripts.txt /srv/explorer \
&& cargo install --root /srv/explorer/electrs_bitcoin --path . \
&& cargo install --root /srv/explorer/electrs_liquid --path . --features "liquid" \
&& cd .. \
&& rm -fr /root/.cargo electrs \
&& strip /srv/explorer/electrs_*/bin/electrs
# cleanup
RUN apt-get --auto-remove remove -yqq --purge clang cmake manpages curl git \
&& apt-get clean \
&& apt-get autoclean \
&& rm -rf /usr/share/doc* /usr/share/man /usr/share/postgresql/*/man /var/lib/apt/lists/* /var/cache/* /tmp/* /root/.cache /*.deb /root/.cargo