-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.aztec-testnet-grpc
More file actions
34 lines (25 loc) · 1.08 KB
/
Dockerfile.aztec-testnet-grpc
File metadata and controls
34 lines (25 loc) · 1.08 KB
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
FROM ubuntu:24.04 AS builder
RUN apt-get update && apt-get install -y curl python3 make g++ && \
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app/js-aztec-testnet
COPY js-aztec-testnet/package*.json ./
RUN --mount=type=cache,id=npm-aztec-testnet,target=/root/.npm npm ci --ignore-scripts
COPY js-aztec-testnet/ .
COPY protos/ /app/protos/
RUN npm run build
FROM ubuntu:24.04 AS final
RUN apt-get update && apt-get install -y curl && \
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
apt-get purge -y curl && apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app/js-aztec-testnet
COPY --from=builder /app/js-aztec-testnet/node_modules ./node_modules
COPY --from=builder /app/js-aztec-testnet/dist ./dist
COPY --from=builder /app/js-aztec-testnet/src/contracts ./contracts
COPY --from=builder /app/js-aztec-testnet/package.json ./package.json
COPY --from=builder /app/protos /app/protos
EXPOSE 8080
CMD ["node", "dist/server.js"]