forked from garethtdavies/docker-zcash
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
35 lines (27 loc) · 1.07 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
FROM debian:jessie
ENV ZCASH_URL=https://github.com/zcash/zcash.git \
ZCASH_CONF=/home/zcash/.zcash/zcash.conf
RUN apt-get update
RUN apt-get -qqy install --no-install-recommends build-essential \
automake ncurses-dev libcurl4-openssl-dev libssl-dev libgtest-dev \
make autoconf automake libtool git apt-utils pkg-config libc6-dev \
libcurl3-dev libudev-dev m4 g++-multilib unzip git python zlib1g-dev \
wget ca-certificates pwgen bsdmainutils curl
WORKDIR /src
RUN git clone ${ZCASH_URL}
WORKDIR /src/zcash
RUN ./zcutil/build.sh -j$(nproc)
WORKDIR /src/zcash/src
RUN /usr/bin/install -c zcash-tx zcashd zcash-cli zcash-gtest -t /usr/local/bin/ && \
rm -rf /src/zcash/ && \
adduser --uid 1000 --system zcash && \
mkdir -p /home/zcash/.zcash/ && \
mkdir -p /home/zcash/.zcash-params/ && \
chown -R zcash /home/zcash && \
echo "Success"
USER zcash
RUN echo "rpcuser=zcash" > ${ZCASH_CONF} && \
echo "rpcpassword=`pwgen 20 1`" >> ${ZCASH_CONF} && \
echo "addnode=mainnet.z.cash" >> ${ZCASH_CONF} && \
echo "Success"
VOLUME ["/home/zcash/.zcash"]