-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (50 loc) · 1.08 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 ubuntu:20.04 as builder
ARG DEBIAN_FRONTEND=noninteractive
RUN set -ex; \
apt-get update; \
apt-get install -y \
autoconf \
automake \
bsdmainutils \
build-essential \
ca-certificates \
clang-9 \
curl \
g++-multilib \
git \
libc6-dev \
libtool \
libltdl-dev \
libtinfo5 \
m4 \
ncurses-dev \
pkg-config \
python \
unzip \
zlib1g-dev \
; \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -s /bin/bash builder
USER builder
WORKDIR /home/builder
ARG VERSION
RUN git clone --depth=1 --branch=v${VERSION} https://github.com/zcash/zcash.git
RUN set -ex; \
cd zcash; \
./zcutil/build.sh -j$(nproc)
FROM ubuntu:20.04
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
libgomp1 \
wget \
; \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /home/builder/zcash/src/zcashd /home/builder/zcash/zcutil/fetch-params.sh /usr/bin/
RUN useradd -m -u 1000 -s /bin/bash runner
USER runner
RUN fetch-params.sh
ENTRYPOINT ["zcashd"]
# Check that we can at least execute zcashd
RUN ["zcashd", "--version"]