-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (31 loc) · 1.18 KB
/
Dockerfile
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 debian:trixie-slim
WORKDIR /usr/src/benchmarks
# Update, upgrade, and install dependencies
RUN apt update && apt upgrade -y && \
apt install -y hey lsof curl gcc musl-dev build-essential nginx=1.26.0-3+b1 wget nodejs npm && \
rm -rf /var/lib/apt/lists/*
# Setup Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy source code for Rust build
COPY source/Cargo.lock source/Cargo.toml source/*.json .
COPY source/src/main.rs src/main.rs
# Build Rust project
RUN cargo build --release
# Configure NGINX
COPY nginx/nginx.conf /etc/nginx/sites-available/default
# Install WunderGraph CLI and Router
RUN npm install -g wgc@latest && \
wgc router download-binary -o . && \
mv router wunder && \
chmod +x wunder
# Install Apollo Router
RUN curl -sSL https://router.apollo.dev/download/nix/latest | sh && \
mv router apollo && chmod +x apollo
# Setup Grafbase
RUN curl -fsSL https://grafbase.com/downloads/gateway | bash && \
mv ~/.grafbase/bin/grafbase-gateway grafbase && chmod +x grafbase
# Setup Tailcall
RUN npm install -g @tailcallhq/tailcall
COPY configurations/ ./configurations/
COPY scripts/* .