forked from followtheart/electrumx-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (37 loc) · 1.66 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
FROM ubuntu
MAINTAINER followtheart "[email protected]"
RUN apt-get update \
&& apt-get install -y software-properties-common --no-install-recommends \
&& add-apt-repository -y ppa:jonathonf/python-3.6 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3.6 python3.6-dev libleveldb-dev wget git \
libssl-dev daemontools nano build-essential \
&& rm /usr/bin/python3 \
&& ln -s /usr/bin/python3.6 /usr/bin/python3 \
&& wget https://bootstrap.pypa.io/get-pip.py -O- | python3.6 \
&& pip install scrypt \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& mkdir /log /db /env \
&& groupadd -r electrumx \
&& useradd -s /bin/bash -m -g electrumx electrumx \
&& cd /home/electrumx \
&& git clone https://github.com/BitCraftIO/electrumx.git \
&& chown -R electrumx:electrumx electrumx && cd electrumx \
&& chown -R electrumx:electrumx /log /db /env \
&& python3.6 setup.py install
USER electrumx
VOLUME /db /log /env
COPY env/* /env/
RUN cd ~ \
&& mkdir -p ~/service ~/scripts/electrumx \
&& cp -R ~/electrumx/contrib/daemontools/* ~/scripts/electrumx \
&& chmod +x ~/scripts/electrumx/run \
&& chmod +x ~/scripts/electrumx/log/run \
&& sed -i '$d' ~/scripts/electrumx/log/run \
&& sed -i '$a\exec multilog t s500000 n10 /log' ~/scripts/electrumx/log/run \
&& cp /env/* /home/electrumx/scripts/electrumx/env/ \
&& cat ~/scripts/electrumx/env/coins.py >> ~/electrumx/lib/coins.py \
&& ln -s ~/scripts/electrumx ~/service/electrumx
CMD ["bash","-c","cp /env/* /home/electrumx/scripts/electrumx/env/ && svscan ~/service"]