Skip to content

Commit

Permalink
Simplify Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Mar 5, 2025
1 parent 89c85ce commit ac50c3e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
6 changes: 1 addition & 5 deletions docker/bootstrap-node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
FROM --platform=$BUILDPLATFORM ubuntu:22.04

ARG RUSTC_VERSION=nightly-2024-12-24
ARG PROFILE=production
ARG RUSTFLAGS
# Incremental compilation here isn't helpful
Expand Down Expand Up @@ -51,10 +50,7 @@ RUN \
libc6-dev-amd64-cross \
; fi

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

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

Expand Down
6 changes: 1 addition & 5 deletions docker/farmer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
FROM --platform=$BUILDPLATFORM ubuntu:22.04

ARG RUSTC_VERSION=nightly-2024-12-24
ARG PROFILE=production
ARG RUSTFLAGS
# Incremental compilation here isn't helpful
Expand Down Expand Up @@ -51,10 +50,7 @@ RUN \
libc6-dev-amd64-cross \
; fi

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

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

Expand Down
6 changes: 1 addition & 5 deletions docker/gateway.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
FROM --platform=$BUILDPLATFORM ubuntu:22.04

ARG RUSTC_VERSION=nightly-2024-12-24
ARG PROFILE=production
ARG RUSTFLAGS
# Incremental compilation here isn't helpful
Expand Down Expand Up @@ -51,10 +50,7 @@ RUN \
libc6-dev-amd64-cross \
; fi

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

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

Expand Down
7 changes: 2 additions & 5 deletions docker/node.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
FROM --platform=$BUILDPLATFORM ubuntu:22.04

ARG RUSTC_VERSION=nightly-2024-12-24
ARG PROFILE=production
ARG RUSTFLAGS
# Incremental compilation here isn't helpful
Expand Down Expand Up @@ -51,10 +50,8 @@ RUN \
libc6-dev-amd64-cross \
; fi

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

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

COPY . /code
Expand Down
6 changes: 1 addition & 5 deletions docker/runtime.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Dockerfile supports both native building and cross-compilation to x86-64, aarch64 and riscv64
FROM --platform=$BUILDPLATFORM ubuntu:22.04

ARG RUSTC_VERSION=nightly-2024-12-24
ARG PROFILE=production
ARG RUSTFLAGS
# Incremental compilation here isn't helpful
Expand Down Expand Up @@ -51,10 +50,7 @@ RUN \
libc6-dev-amd64-cross \
; fi

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

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

Expand Down

0 comments on commit ac50c3e

Please sign in to comment.