forked from schpet/cracked
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.rust
More file actions
35 lines (28 loc) · 1.2 KB
/
Dockerfile.rust
File metadata and controls
35 lines (28 loc) · 1.2 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
# syntax=docker/dockerfile:1
# Rust child image for cracked development environment
# Inherits from base and adds Rust toolchain with cargo ecosystem
# Registry: ghcr.io/schpet/cracked:rust
#
# Can also setup Rust directly:
# curl -fsSL https://raw.githubusercontent.com/schpet/cracked/main/setup.sh | bash -s -- --rust
ARG BASE_IMAGE=cracked:base
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.source="https://github.com/schpet/cracked"
LABEL org.opencontainers.image.description="Development environment with Rust toolchain and cargo ecosystem"
# Install Rust using rustup (official installer)
# This handles architecture detection automatically
ENV RUSTUP_HOME="/home/dev/.rustup"
ENV CARGO_HOME="/home/dev/.cargo"
ENV PATH="${CARGO_HOME}/bin:${PATH}"
# Run setup script (handles root deps and user-level rust installation)
RUN /usr/local/bin/setup.sh --rust
# Verify all tools are installed
# Note: cargo-dist installs as 'dist', cargo-watch as 'cargo-watch', cargo-edit as 'cargo-set-version'
RUN rustc --version && \
cargo --version && \
clippy-driver --version && \
rustfmt --version && \
dist --version && \
cargo-watch --version && \
cargo set-version --version
CMD ["/usr/bin/fish"]