-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (27 loc) · 801 Bytes
/
Dockerfile
File metadata and controls
43 lines (27 loc) · 801 Bytes
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
35
36
37
38
39
40
41
42
43
FROM dart:stable AS benchmark
# Install dependencies
WORKDIR /app
COPY pubspec.* .
RUN dart pub get
# Install pinned oha for HTTP benchmarks
RUN apt-get update && apt-get install -y curl ca-certificates \
&& curl -L https://github.com/hatoo/oha/releases/download/v1.13.0/oha-linux-amd64 -o /usr/local/bin/oha \
&& chmod +x /usr/local/bin/oha \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY . .
RUN dart pub get --offline
RUN ls -la
RUN dart run
FROM node:23-slim as build_docs
WORKDIR /app/docs
COPY /docs/package.json .
RUN npm install
RUN ls -la
COPY ./docs/. .
COPY --from=benchmark /app/docs/data ./data
RUN ls -la
RUN npm run docs:build
FROM nginx:alpine
COPY --from=build_docs /app/docs/.vitepress/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]