-
Notifications
You must be signed in to change notification settings - Fork 70
/
Dockerfile
63 lines (52 loc) · 1.41 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
53
54
55
56
57
58
59
60
61
62
63
FROM debian:stretch-slim as build
# Install our build dependencies
RUN apt-get update \
&& apt-get install -y \
curl \
build-essential \
pkg-config \
libc6-dev \
m4 \
g++-multilib \
autoconf \
libtool \
ncurses-dev \
unzip \
git \
python \
zlib1g-dev \
wget \
bsdmainutils \
automake \
p7zip-full \
pwgen \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/local/src/
COPY . /usr/local/src/
RUN ./zcutil/build.sh -j$(nproc)
RUN ./zcutil/fetch-params.sh
FROM debian:stretch-slim
# Add our user and group first to ensure consistency
RUN groupadd -r bitcoinz && useradd -r -d /bitcoinz -g bitcoinz bitcoinz
# Install our run dependencies
RUN apt-get update \
&& apt-get install -y \
curl \
libc6-dev \
g++-multilib \
&& rm -rf /var/lib/apt/lists/*
# Setup application directory
RUN mkdir -p /bitcoinz/data
# Copy binaries from build container
COPY --from=build /usr/local/src/src/bitcoinzd /usr/local/bin
COPY --from=build /usr/local/src/src/bitcoinz-cli /usr/local/bin
COPY --from=build /usr/local/src/src/zcash-gtest /usr/local/bin
COPY --from=build /usr/local/src/src/bitcoinz-tx /usr/local/bin
COPY contrib/docker/cli /usr/local/bin
RUN chmod +x /usr/local/bin/cli
# Copy zcash params
COPY --from=build /root/.zcash-params /bitcoinz/.zcash-params
RUN chown -R bitcoinz: /bitcoinz
USER bitcoinz
WORKDIR /bitcoinz
CMD ["bitcoinzd", "-datadir=/bitcoinz/data"]