forked from etherspot/skandha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 893 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
29
FROM --platform=${BUILDPLATFORM:-amd64} node:18-alpine as build_src
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 git && rm -rf /var/cache/apk/*
COPY . .
RUN yarn install --non-interactive --frozen-lockfile && \
yarn bootstrap && \
yarn build && \
yarn install --non-interactive --frozen-lockfile --production
FROM node:18-alpine as build_deps
WORKDIR /usr/app
RUN apk update && apk add --no-cache g++ make python3 git && rm -rf /var/cache/apk/*
COPY --from=build_src /usr/app .
RUN yarn install --non-interactive --frozen-lockfile --production --force
RUN npx [email protected] bootstrap --ignore-scripts -- --production --no-optional
RUN cd node_modules/bcrypto && yarn install
FROM node:18-alpine
WORKDIR /usr/app
COPY --from=build_deps /usr/app .
ENV NODE_OPTIONS=--experimental-specifier-resolution=node
ENTRYPOINT ["node", "./packages/cli/bin/skandha"]