-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (34 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
44 lines (34 loc) · 1.07 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
35
36
37
38
39
40
41
42
43
44
FROM node:22-slim
# Install required tools
RUN apt-get update && apt-get install -y \
curl \
wget \
jq \
procps \
lsof \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install hyperfine (detect architecture automatically)
RUN ARCH=$(dpkg --print-architecture) && \
wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine_1.18.0_${ARCH}.deb && \
dpkg -i hyperfine_1.18.0_${ARCH}.deb && \
rm hyperfine_1.18.0_${ARCH}.deb
# Install pnpm, autocannon, and bun
RUN npm install -g pnpm@10 autocannon && \
curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Set working directory
WORKDIR /benchmark
# Copy package files first for better caching
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY benchmark-config.json README.md ./
# Copy apps
COPY apps ./apps
# Copy scripts
COPY scripts ./scripts
# Create results directory
RUN mkdir -p results/raw
# Install dependencies
RUN pnpm install --frozen-lockfile
# Default command - run benchmarks with bun
CMD ["bun", "run", "scripts/benchmark.ts"]