forked from across-protocol/relayer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (21 loc) · 837 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
30
31
32
ARG NODEJS_VERSION=20
##### Stage 1
FROM node:$NODEJS_VERSION-alpine AS builder
RUN apk add --no-cache alpine-sdk=~1 python3=~3 && \
adduser -D builder && \
chown -R builder:builder /home/builder/
USER builder
WORKDIR /home/builder/build
COPY . .
RUN yarn install --frozen-lockfile && yarn build
##### Stage 2
FROM node:$NODEJS_VERSION-alpine
RUN apk add --no-cache aws-cli=~2 jq=~1 && \
adduser -D lisk && \
chown -R lisk:lisk /home/lisk/
USER lisk
WORKDIR /home/lisk/across-relayer
COPY --chown=lisk:lisk --from=builder /home/builder/build/node_modules/ ./node_modules/
COPY --chown=lisk:lisk --from=builder /home/builder/build/dist/ ./dist/
COPY --chown=lisk:lisk --from=builder /home/builder/build/config/ ./config/
COPY --chown=lisk:lisk --from=builder /home/builder/build/scripts/lisk/docker/ ./scripts/