forked from wormhole-foundation/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cli
More file actions
23 lines (15 loc) · 815 Bytes
/
Dockerfile.cli
File metadata and controls
23 lines (15 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM node:22.16-alpine3.22@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e as cli-build
# fetch scripts/guardian-set-init.sh deps
RUN apk update && apk add bash g++ make python3 curl jq findutils
# Copy package.json & package-lock.json by themselves to create a cache layer
COPY clients/js/package.json clients/js/package-lock.json /clients/js/
WORKDIR /clients/js
RUN npm ci
# Copy the rest of the source files, as a layer on top of the deps
COPY clients/js /clients/js
# Build CLI
RUN npm run build
FROM scratch AS cli-export
COPY --from=cli-build clients/js/build/main.js clients/js/build/main.js
COPY --from=cli-build clients/js/package.json clients/js/package.json