-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 796 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 796 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
FROM ghcr.io/foundry-rs/foundry:stable
WORKDIR /app
USER root
# Install system dependencies
RUN apt-get update && apt-get install -y curl jq build-essential && \
rm -rf /var/lib/apt/lists/*
# Install Rust and set up toolchain
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}" RUSTUP_HOME="/root/.rustup" CARGO_HOME="/root/.cargo"
RUN . ~/.cargo/env && rustup default stable && cargo install rust-script
COPY . .
# Setup deployment scripts
RUN mkdir /scripts && cp .github/deployment/scripts/protocol-cli.rs /scripts/ && \
chmod +x /scripts/protocol-cli.rs
# Precompile rust-script to cache in image
RUN rust-script /scripts/protocol-cli.rs --help
# Build contracts
RUN forge soldeer update
RUN forge build
ENTRYPOINT ["forge"]
CMD ["--version"]