forked from hicommonwealth/edgeware-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 836 Bytes
/
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
FROM phusion/baseimage:focal-1.0.0alpha1-amd64 AS builder
LABEL maintainer="jake@commonwealth.im"
LABEL description="This is the build stage. Here we create the binary."
ARG PROFILE=release
WORKDIR /edgeware
COPY . /edgeware
RUN /edgeware/setup.sh
# ===== SECOND STAGE ======
FROM phusion/baseimage:focal-1.0.0alpha1-amd64
LABEL maintainer="hello@commonwealth.im"
LABEL description="This is the 2nd stage: a very small image where we copy the Edgeware binary."
ARG PROFILE=release
COPY --from=builder /edgeware/target/$PROFILE/edgeware /usr/local/bin
COPY --from=builder /edgeware/chains /usr/local/bin/chains
RUN rm -rf /usr/lib/python* && \
mkdir -p /root/.local/share && \
ln -s /root/.local/share /data
EXPOSE 30333 9933 9944
VOLUME ["/data"]
WORKDIR /usr/local/bin
CMD ["edgeware", "--chain", "edgeware", "--ws-external"]