File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
- ARG BASE_IMAGE=ubuntu:24.04
1
+ ARG BASE_IMAGE=ubuntu:latest
2
2
3
3
FROM $BASE_IMAGE AS builder
4
4
SHELL ["/bin/bash" , "-c" ]
@@ -18,18 +18,22 @@ RUN apt-get update && \
18
18
apt-get install -y curl build-essential protobuf-compiler clang git pkg-config libssl-dev && \
19
19
rm -rf /var/lib/apt/lists/*
20
20
21
- RUN set -o pipefail && curl https://sh.rustup.rs -sSf | sh -s -- -y
22
- ENV PATH="/root/.cargo/bin:${PATH}"
23
- RUN rustup update stable
24
- RUN rustup target add wasm32-unknown-unknown --toolchain stable
25
-
26
21
# Copy entire repository
27
22
COPY . /build
28
23
WORKDIR /build
29
24
25
+ # Install Rust
26
+ RUN set -o pipefail && curl https://sh.rustup.rs -sSf | sh -s -- -y
27
+ ENV PATH="/root/.cargo/bin:${PATH}"
28
+ RUN rustup toolchain install
29
+ RUN rustup target add wasm32-unknown-unknown
30
+
30
31
# Build the project
31
32
RUN cargo build -p node-subtensor --profile production --features="metadata-hash" --locked
32
33
34
+ # Slim down image
35
+ RUN rm -rf /root/.cargo
36
+
33
37
# Verify the binary was produced
34
38
RUN test -e /build/target/production/node-subtensor
35
39
You can’t perform that action at this time.
0 commit comments