forked from filecoin-project/venus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ci.filecoin
47 lines (39 loc) · 2.05 KB
/
Dockerfile.ci.filecoin
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
FROM busybox:1-glibc AS filecoin
MAINTAINER Filecoin Dev Team
# Get the filecoin binary, entrypoint script, and TLS CAs from the build container.
ENV SRC_DIR /go/src/github.com/filecoin-project/go-filecoin
COPY filecoin-proof-parameters /tmp/filecoin-proof-parameters
COPY filecoin/go-filecoin /usr/local/bin/go-filecoin
COPY bin/container_daemon /usr/local/bin/start_filecoin
COPY bin/devnet_start /usr/local/bin/devnet_start
COPY bin/node_restart /usr/local/bin/node_restart
COPY fixtures/ /data/
COPY gengen/gengen /usr/local/bin/gengen
COPY --from=filecoin:all /tmp/su-exec/su-exec /sbin/su-exec
COPY --from=filecoin:all /tmp/tini /sbin/tini
COPY --from=filecoin:all /etc/ssl/certs /etc/ssl/certs
RUN ln -sf /tmp/filecoin-proof-parameters/v9-zigzag-proof-of-replication-52431242c129794fe51d373ae29953f2ff52abd94c78756e318ce45f3e4946d8 /tmp/filecoin-proof-parameters/params.out
# This shared lib (part of glibc) doesn't seem to be included with busybox.
COPY --from=filecoin:all /lib/x86_64-linux-gnu/libdl-2.24.so /lib/libdl.so.2
COPY --from=filecoin:all /lib/x86_64-linux-gnu/librt.so.1 /lib/librt.so.1
COPY --from=filecoin:all /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
COPY --from=filecoin:all /lib/x86_64-linux-gnu/libutil.so.1 /lib/libutil.so.1
# need jq for parsing genesis output
RUN wget -q -O /usr/local/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \
&& chmod +x /usr/local/bin/jq
# Ports for Swarm and CmdAPI
EXPOSE 6000
EXPOSE 3453
# Create the fs-repo directory and switch to a non-privileged user.
ENV FILECOIN_PATH /data/filecoin
RUN mkdir -p $FILECOIN_PATH \
&& adduser -D -h $FILECOIN_PATH -u 1000 -G users filecoin \
&& chown filecoin:users $FILECOIN_PATH
# Expose the fs-repo as a volume.
# start_filecoin initializes an fs-repo if none is mounted.
# Important this happens after the USER directive so permission are correct.
VOLUME $FILECOIN_PATH
# There's an fs-repo, and initializes one if there isn't.
ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/start_filecoin"]
# Execute the daemon subcommand by default
CMD ["daemon"]