-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile_quick
56 lines (35 loc) · 1.47 KB
/
Dockerfile_quick
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
ARG UBUNTU_BUILDER=ubuntu:20.04
ARG MAINNET_RUNNER=quay.io/team-helium/blockchain-node:blockchain-node-ubuntu18-1.1.53
ARG TESTNET_RUNNER=quay.io/team-helium/blockchain-node:blockchain-node-testnet-ubuntu18-1.1.53
ARG NETWORK=mainnet
FROM $UBUNTU_BUILDER as rosetta-builder
WORKDIR /src
RUN apt update \
&& apt install -y --no-install-recommends \
curl ca-certificates git \
&& curl -L https://golang.org/dl/go1.17.1.linux-amd64.tar.gz | tar xzf -
ENV PATH="/src/go/bin:$PATH" \
CGO_ENABLED=0
COPY . rosetta-helium
RUN cd rosetta-helium && go build -o rosetta-helium
FROM ${MAINNET_RUNNER} as runner-mainnet
WORKDIR /app
COPY --from=rosetta-builder /src/rosetta-helium/rosetta-helium rosetta-helium
COPY --from=rosetta-builder /src/rosetta-helium/docker/mainnet.sh start.sh
COPY --from=rosetta-builder /src/rosetta-helium/helium-constructor helium-constructor
FROM ${TESTNET_RUNNER} as runner-testnet
WORKDIR /app
COPY --from=rosetta-builder /src/rosetta-helium/rosetta-helium rosetta-helium
COPY --from=rosetta-builder /src/rosetta-helium/docker/testnet.sh start.sh
COPY --from=rosetta-builder /src/rosetta-helium/helium-constructor helium-constructor
FROM runner-${NETWORK} as rosetta-helium-final
EXPOSE 8080
EXPOSE 44158
RUN apt update \
&& apt install -y --no-install-recommends \
ca-certificates git npm
RUN cd helium-constructor \
&& npm install \
&& npm run build \
&& chmod +x /app/start.sh
ENTRYPOINT ["/app/start.sh"]