forked from tfgrid/zosbuilder
- Complete bash framework with strict error handling - Modular library system (docker, alpine, components, initramfs, kernel, testing) - Rust component integration (zinit, rfs, mycelium) with musl targeting - Rootless Docker/Podman support for GitHub Actions - Centralized configuration in config/build.conf - 2-stage module loading system - Strip + UPX optimization for minimal size - Complete zinit integration replacing OpenRC - GitHub Actions CI/CD pipeline - Comprehensive documentation and usage guides Components: - Latest stable kernel 6.12.44 - Alpine Linux 3.22 base - ThreeFold components: zinit, mycelium, rfs, corex - Target: ~8-12MB final initramfs.cpio.xz
45 lines
867 B
Docker
45 lines
867 B
Docker
# Zero OS Alpine Initramfs Builder Container
|
|
FROM alpine:3.22
|
|
|
|
# Install build dependencies
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
rust \
|
|
cargo \
|
|
upx \
|
|
git \
|
|
wget \
|
|
tar \
|
|
gzip \
|
|
xz \
|
|
cpio \
|
|
binutils \
|
|
linux-headers \
|
|
musl-dev \
|
|
pkgconfig \
|
|
openssl-dev \
|
|
bash \
|
|
findutils \
|
|
grep \
|
|
sed \
|
|
coreutils
|
|
|
|
# Add Rust musl target
|
|
RUN rustup target add x86_64-unknown-linux-musl
|
|
|
|
# Create non-root user for builds
|
|
RUN adduser -D -s /bin/bash builder && \
|
|
chown -R builder:builder /home/builder
|
|
|
|
# Set working directory
|
|
WORKDIR /workspace
|
|
|
|
# Set environment variables for static linking
|
|
ENV RUSTFLAGS="-C target-feature=+crt-static"
|
|
ENV CC_x86_64_unknown_linux_musl="musl-gcc"
|
|
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER="musl-gcc"
|
|
|
|
# Default to builder user
|
|
USER builder
|
|
|
|
CMD ["/bin/bash"] |