-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.relay
41 lines (33 loc) · 1.19 KB
/
Dockerfile.relay
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
FROM alpine as yarn-lock
RUN apk add jq coreutils
WORKDIR /out
COPY package.json .yarnrc.yml yarn.lock ./
WORKDIR /src
COPY . .
RUN :\
&& cp /out/package.json . \
&& JQ_EXPR='{ name, packageManager, workspaces, resolutions, dependencies, devDependencies } | with_entries(select(.value != null))' \
&& find . -name "**package.json" -not -path "./vendor/*" -not -path "./beacon-light-client/circom/*" -print0 \
| xargs -0 -n1 sh -c 'x="/out/$1" && mkdir -p "${x%/*}" && jq "'"$JQ_EXPR"'" < "$1" > "$x"' -s
FROM dendreth-relay-yarn:latest as yarn-installer
WORKDIR /src
COPY --from=yarn-lock /out .
RUN mkdir /tmp
RUN yarn install
FROM dendreth-relay:latest as main
WORKDIR /DendrETH
RUN mkdir /tmp
COPY --from=yarn-lock /out .
COPY --from=yarn-installer /src .
COPY ./supervisord.conf ./supervisord.conf
COPY ./conf.d ./conf.d
COPY ./relay ./relay
COPY ./libs/ ./libs
COPY ./beacon-light-client/solidity ./beacon-light-client/solidity
COPY ./contracts/cosmos ./contracts/cosmos
COPY ./tsconfig.json ./tsconfig.json
COPY ./scripts ./scripts
ENV INFURA_API_KEY=asd ETHERSCAN_API_KEY=asd
RUN cd beacon-light-client/solidity && yarn hardhat compile
VOLUME DendrETH/data
ENTRYPOINT ["./relay/run-relay.sh"]