-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (35 loc) · 1.21 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
45
# Use an official Node.js image as base
FROM node:18
# Set a working directory
WORKDIR /app
# Install necessary dependencies, including graph-cli
RUN npm install -g @graphprotocol/graph-cli
# Install other essential packages
RUN apt-get update && apt-get install -y \
git \
curl \
wget \
tar \
make \
&& rm -rf /var/lib/apt/lists/*
# Download and install the latest Substreams CLI release
RUN curl -s https://api.github.com/repos/streamingfast/substreams/releases/latest | \
grep "browser_download_url.*linux_x86_64.tar.gz" | \
cut -d '"' -f 4 | \
wget -qi - && \
tar -xzf substreams_linux_x86_64.tar.gz && \
mv substreams /usr/local/bin/substreams && \
rm substreams_linux_x86_64.tar.gz
# Install Buf CLI
RUN npm install -g @bufbuild/buf
# Install Rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install target for substreams
RUN rustup target add wasm32-unknown-unknown
# Clone the subgraph repository
RUN git clone https://github.com/pinax-network/subgraph-contract-creation.git
# Set the working directory to the root of the cloned repository
WORKDIR /app/subgraph-contract-creation
# Run the make command on startup
CMD ["make"]