Skip to content

Commit 1896012

Browse files
committed
experimental: add Dockerfile for report
1 parent f3ac95d commit 1896012

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

DockerfileReportOnly

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# build stage
2+
FROM node:22-alpine AS build-stage
3+
4+
ARG REPORT
5+
ENV REPORT="${REPORT}"
6+
7+
WORKDIR /workspace
8+
9+
COPY scatter/report /workspace/report
10+
COPY scatter/pipeline/outputs/${REPORT}/hierarchical_result.json /workspace/pipeline/outputs/${REPORT}/hierarchical_result.json
11+
COPY scatter/pipeline/outputs/${REPORT}/metadata.json /workspace/pipeline/outputs/${REPORT}/metadata.json
12+
COPY scatter/pipeline/outputs/${REPORT}/reporter.png /workspace/pipeline/outputs/${REPORT}/reporter.png
13+
COPY scatter/pipeline/outputs/${REPORT}/icon.png /workspace/pipeline/outputs/${REPORT}/icon.png
14+
15+
RUN cd report && npm install && npm run build
16+
17+
# runtime stage
18+
FROM node:22-alpine AS runtime-stage
19+
20+
WORKDIR /workspace
21+
22+
RUN npm install -g serve
23+
24+
ARG REPORT
25+
ENV REPORT="${REPORT}"
26+
27+
COPY --from=build-stage /workspace/pipeline/outputs/${REPORT}/report /workspace/out
28+
29+
ENV PORT="8080"
30+
31+
CMD ["serve", "-s", "/workspace/out", "-l", "8080"]

scatter/report/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbopack",
7-
"postinstall": "next build",
87
"build": "next build",
98
"start": "npx serve ../pipeline/outputs/${REPORT}/report",
109
"lint": "next lint"

0 commit comments

Comments
 (0)