Files
ere/docker/nexus/Dockerfile.base
2025-10-18 08:55:36 +08:00

30 lines
1.1 KiB
Docker

ARG BASE_IMAGE=ere-base:latest
FROM $BASE_IMAGE
# The ere-base image provides Rust, Cargo, and common tools.
# We operate as root for SDK installation.
# Define the Nexus toolchain for convenience in subsequent commands if needed.
ENV NEXUS_TOOLCHAIN_VERSION="nightly-2025-04-06"
# Set default toolchain
RUN rustup default "$NEXUS_TOOLCHAIN_VERSION"
# Copy the Nexus SDK installer script from the workspace context
COPY --chmod=755 scripts/sdk_installers/install_nexus_sdk.sh /tmp/install_nexus_sdk.sh
# Run the Nexus SDK installation script.
# This script installs the specific Rust toolchain (nightly-2025-04-06)
# and installs cargo-nexus
# The CARGO_HOME from ere-base (e.g., /root/.cargo) will be used, and cargo-nexus will be in its bin.
RUN /tmp/install_nexus_sdk.sh && rm /tmp/install_nexus_sdk.sh # Clean up the script
# Verify Nexus installation
RUN echo "Verifying Nexus installation in Dockerfile (post-script)..." && cargo-nexus --version
# Add `rust-src` component to enable std build for nightly rust.
RUN rustup component add rust-src --toolchain "$NEXUS_TOOLCHAIN_VERSION"
CMD ["/bin/bash"]