Skip to content

Commit ac50c3e

Browse files
committed
Simplify Dockerfiles
1 parent 89c85ce commit ac50c3e

5 files changed

+6
-25
lines changed

docker/bootstrap-node.Dockerfile

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
22
FROM --platform=$BUILDPLATFORM ubuntu:22.04
33

4-
ARG RUSTC_VERSION=nightly-2024-12-24
54
ARG PROFILE=production
65
ARG RUSTFLAGS
76
# Incremental compilation here isn't helpful
@@ -51,10 +50,7 @@ RUN \
5150
libc6-dev-amd64-cross \
5251
; fi
5352

54-
RUN \
55-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \
56-
/root/.cargo/bin/rustup target add wasm32-unknown-unknown && \
57-
/root/.cargo/bin/rustup component add rust-src --toolchain $RUSTC_VERSION
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
5854

5955
# Up until this line all Rust images in this repo should be the same to share the same layers
6056

docker/farmer.Dockerfile

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
22
FROM --platform=$BUILDPLATFORM ubuntu:22.04
33

4-
ARG RUSTC_VERSION=nightly-2024-12-24
54
ARG PROFILE=production
65
ARG RUSTFLAGS
76
# Incremental compilation here isn't helpful
@@ -51,10 +50,7 @@ RUN \
5150
libc6-dev-amd64-cross \
5251
; fi
5352

54-
RUN \
55-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \
56-
/root/.cargo/bin/rustup target add wasm32-unknown-unknown && \
57-
/root/.cargo/bin/rustup component add rust-src --toolchain $RUSTC_VERSION
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
5854

5955
# Up until this line all Rust images in this repo should be the same to share the same layers
6056

docker/gateway.Dockerfile

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
22
FROM --platform=$BUILDPLATFORM ubuntu:22.04
33

4-
ARG RUSTC_VERSION=nightly-2024-12-24
54
ARG PROFILE=production
65
ARG RUSTFLAGS
76
# Incremental compilation here isn't helpful
@@ -51,10 +50,7 @@ RUN \
5150
libc6-dev-amd64-cross \
5251
; fi
5352

54-
RUN \
55-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \
56-
/root/.cargo/bin/rustup target add wasm32-unknown-unknown && \
57-
/root/.cargo/bin/rustup component add rust-src --toolchain $RUSTC_VERSION
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
5854

5955
# Up until this line all Rust images in this repo should be the same to share the same layers
6056

docker/node.Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
22
FROM --platform=$BUILDPLATFORM ubuntu:22.04
33

4-
ARG RUSTC_VERSION=nightly-2024-12-24
54
ARG PROFILE=production
65
ARG RUSTFLAGS
76
# Incremental compilation here isn't helpful
@@ -51,10 +50,8 @@ RUN \
5150
libc6-dev-amd64-cross \
5251
; fi
5352

54-
RUN \
55-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \
56-
/root/.cargo/bin/rustup target add wasm32-unknown-unknown && \
57-
/root/.cargo/bin/rustup component add rust-src --toolchain $RUSTC_VERSION
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
54+
5855
# Up until this line all Rust images in this repo should be the same to share the same layers
5956

6057
COPY . /code

docker/runtime.Dockerfile

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
22
FROM --platform=$BUILDPLATFORM ubuntu:22.04
33

4-
ARG RUSTC_VERSION=nightly-2024-12-24
54
ARG PROFILE=production
65
ARG RUSTFLAGS
76
# Incremental compilation here isn't helpful
@@ -51,10 +50,7 @@ RUN \
5150
libc6-dev-amd64-cross \
5251
; fi
5352

54-
RUN \
55-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $RUSTC_VERSION && \
56-
/root/.cargo/bin/rustup target add wasm32-unknown-unknown && \
57-
/root/.cargo/bin/rustup component add rust-src --toolchain $RUSTC_VERSION
53+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
5854

5955
# Up until this line all Rust images in this repo should be the same to share the same layers
6056

0 commit comments

Comments
 (0)