- Fix container output visibility with proper TTY handling and debug mode - Fix build order: kernel modules built before initramfs creation - Implement two-stage kernel build to resolve chicken-and-egg dependency - Fix sed command issues in kernel configuration with direct execution - Add diffutils package to container for proper kernel build support - Enhance NIC module/firmware correlation with intelligent selection - Fix module staging logic: all NICs loaded in stage1 before network up - Add smart firmware installation based on module requirements - Create comprehensive function documentation (scripts/functionlist.md) - Add debug container script for troubleshooting Major fixes: * Container builds now show real-time output * Kernel builds work with proper GNU diff support * Module/firmware selection optimized for common hardware * Build process handles dependencies correctly * Documentation provides complete function reference
55 lines
1.1 KiB
Docker
55 lines
1.1 KiB
Docker
# Zero OS Alpine Initramfs Builder Container
|
|
FROM alpine:3.22
|
|
|
|
# Install build dependencies including rustup
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
rustup \
|
|
upx \
|
|
git \
|
|
wget \
|
|
curl \
|
|
tar \
|
|
gzip \
|
|
xz \
|
|
cpio \
|
|
binutils \
|
|
linux-headers \
|
|
musl-dev \
|
|
musl-utils \
|
|
pkgconfig \
|
|
openssl-dev \
|
|
perl \
|
|
bash \
|
|
findutils \
|
|
grep \
|
|
sed \
|
|
coreutils \
|
|
diffutils \
|
|
flex \
|
|
bison \
|
|
bc \
|
|
elfutils-dev \
|
|
ncurses-dev \
|
|
kmod \
|
|
pahole
|
|
|
|
# Setup rustup with stable and musl target
|
|
RUN rustup-init -y && \
|
|
source /root/.cargo/env && \
|
|
rustup install stable && \
|
|
rustup target add x86_64-unknown-linux-musl && \
|
|
echo 'source /root/.cargo/env' >> /etc/profile
|
|
|
|
# Create non-root user for builds matching host user
|
|
RUN adduser -D -s /bin/bash builder
|
|
|
|
# Set working directory with proper permissions
|
|
WORKDIR /workspace
|
|
RUN chown builder:builder /workspace
|
|
|
|
# Set environment variables - rustup handles everything
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
ENV RUSTFLAGS="-C target-feature=+crt-static"
|
|
|
|
CMD ["/bin/bash"] |