-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (44 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
48 lines (44 loc) · 1.55 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
45
46
47
48
# Stage 1: Risc0 Development Container
FROM ghcr.io/anagrambuild/solana:latest
ARG TARGETARCH
# Install packages
ENV DEBIAN_FRONTEND=noninteractive
RUN sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
binutils \
clang \
cmake \
gnupg2 \
libssl-dev \
make \
ninja-build \
perl \
pkg-config \
protobuf-c-compiler \
&& \
sudo apt-get clean && \
sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV USER=solana
ARG SOLANA_VERSION=1.18.22
ENV CARGO_HOME=/usr/local/cargo
ENV RUSTUP_HOME=/usr/local/rustup
ENV PATH=${PATH}:/usr/local/cargo/bin:/go/bin:/home/solana/.local/share/solana/install/releases/${SOLANA_VERSION}/bin
USER solana
RUN cargo install cargo-binstall && \
yes | cargo binstall cargo-risczero
RUN if [ "${TARGETARCH}" = "amd64" -o "${TARGETARCH}" = "linux/amd64" ]; then \
cargo risczero install; \
else \
echo "building risc0 toolchain"; \
cargo risczero build-toolchain; \
fi
LABEL \
org.opencontainers.image.name="risczero" \
org.opencontainers.image.description="Risc0 Development Container" \
org.opencontainers.image.url="https://github.com/anagrambuild/risc0" \
org.opencontainers.image.source="https://github.com/anagrambuild/risc0.git" \
org.opencontainers.image.vendor="anagram.xyz" \
org.opencontainers.image.version="1.0" \
org.opencontainers.image.created=$(date --rfc-3339=seconds) \
org.opencontainers.image.licenses="GNU-Affero" \
org.opencontainers.image.authors="Anagram Build <build@anagram.xyz>"