-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.evm
33 lines (27 loc) · 1.23 KB
/
Dockerfile.evm
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
FROM onfinality/subql-node-ethereum:latest AS build
USER root
WORKDIR /app
RUN chown node:node /app
USER node
COPY --chown=node:node . .
RUN yarn install --frozen-lockfile --no-cache
RUN CHAIN_ID="centrifuge" yarn projectgen && yarn codegen && yarn build
FROM onfinality/subql-node-ethereum:latest
USER root
WORKDIR /app
RUN chown node:node /app
COPY --from=build --chown=node:node /app/package.json /app/package.json
COPY --from=build --chown=node:node /app/yarn.lock /app/yarn.lock
COPY --from=build --chown=node:node /app/project-generator.sh /app/project-generator.sh
COPY --from=build --chown=node:node /app/schema.graphql /app/schema.graphql
COPY --from=build --chown=node:node /app/dist /app/dist
COPY --from=build --chown=node:node /app/chains-cfg /app/chains-cfg
COPY --from=build --chown=node:node /app/chains-evm /app/chains-evm
COPY --from=build --chown=node:node /app/docker-entrypoint /app/docker-entrypoint
RUN cp /app/docker-entrypoint /bin/docker-entrypoint
RUN ln -s /usr/local/lib/node_modules/@subql/node-ethereum/bin/run /bin/run && chmod a+x /bin/run
USER node
RUN yarn install --production --frozen-lockfile --no-cache --no-optional && yarn cache clean
# Set Entry point and command
ENTRYPOINT ["/bin/docker-entrypoint"]
CMD []