-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile
52 lines (41 loc) · 1.53 KB
/
Dockerfile
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
50
51
52
#
# Use docker-ce to persist volumes with --mount
#
# Testnet:
# docker run -p=18332:18332 --mount=source=data,target=/root/.spruned spruned --network bitcoin.testnet --debug
#
# Mainnet:
# docker run -p=8332:8332 --mount=source=data,target=/root/.spruned spruned
#
FROM pypy:3.6-7.1-slim-stretch
RUN apt-get --quiet --quiet update && apt-get --quiet --quiet --no-install-recommends upgrade
RUN apt-get --quiet --quiet --no-install-recommends install gcc g++ python3-setuptools python3-wheel python3-pip curl make
ENV LEVELDB_VERSION=1.20
RUN true \
&& mkdir /opt/leveldb \
&& cd /opt/leveldb \
&& curl -o leveldb.tar.gz https://codeload.github.com/google/leveldb/tar.gz/v${LEVELDB_VERSION} \
&& tar xf leveldb.tar.gz \
&& cd leveldb-${LEVELDB_VERSION}/ \
&& make -j4 \
&& cp -av out-static/lib* out-shared/lib* /usr/local/lib/ \
&& cp -av include/leveldb/ /usr/local/include/ \
&& ldconfig
RUN mkdir /tmp/spruned
RUN mkdir /tmp/spruned/spruned
COPY ./requirements.txt /tmp/spruned
RUN pip3 install -r /tmp/spruned/requirements.txt
COPY ./setup.py /tmp/spruned
COPY ./spruned.py /tmp/spruned
COPY ./LICENSE.txt /tmp/spruned
COPY ./README.rst /tmp/spruned
COPY ./MANIFEST.in /tmp/spruned
COPY ./spruned /tmp/spruned/spruned
RUN pip3 install /tmp/spruned
RUN apt-get remove -y python3-dev python3-pip gcc g++ --purge
RUN apt-get autoremove -y
RUN apt-get install -y
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf /root/.cache
RUN rm -rf /tmp/spruned
ENTRYPOINT [ "pypy3", "/usr/local/bin/spruned", "--rpcbind", "0.0.0.0" ]