44 lines
1.1 KiB
Docker
44 lines
1.1 KiB
Docker
|
|
# Development Dockerfile for local cross-compilation
|
||
|
|
# Lighter version of Dockerfile.cross for development workflows
|
||
|
|
|
||
|
|
ARG RUST_VERSION={{rust_version}}
|
||
|
|
ARG NODE_VERSION={{node_version}}
|
||
|
|
|
||
|
|
FROM node:${NODE_VERSION}-slim
|
||
|
|
|
||
|
|
# Install minimal system dependencies
|
||
|
|
RUN apt-get update && apt-get install -y \
|
||
|
|
curl \
|
||
|
|
build-essential \
|
||
|
|
pkg-config \
|
||
|
|
libssl-dev \
|
||
|
|
musl-tools \
|
||
|
|
git \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
# Install Rust with minimal targets
|
||
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION}
|
||
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||
|
|
|
||
|
|
# Add primary cross-compilation target
|
||
|
|
RUN rustup target add x86_64-unknown-linux-gnu
|
||
|
|
|
||
|
|
# Install essential Rust tools for Rustelo
|
||
|
|
RUN cargo install just --version {{just_version}}
|
||
|
|
|
||
|
|
WORKDIR /workspace
|
||
|
|
|
||
|
|
# Install Node.js package manager
|
||
|
|
RUN npm install -g pnpm@{{pnpm_version}}
|
||
|
|
|
||
|
|
# Environment setup for development
|
||
|
|
ENV CARGO_HOME=/root/.cargo
|
||
|
|
ENV CARGO_TARGET_DIR=/workspace/target
|
||
|
|
ENV NODE_ENV=development
|
||
|
|
ENV RUSTELO_MODE=dev-cross
|
||
|
|
|
||
|
|
# Expose common development ports
|
||
|
|
EXPOSE 3030 8080 8000
|
||
|
|
|
||
|
|
# Default to interactive shell for development
|
||
|
|
CMD ["/bin/bash"]
|