Files
zosbuilder/Dockerfile
Jan De Landtsheer 947d156921
Some checks failed
Build Zero OS Initramfs / build (push) Has been cancelled
Build Zero OS Initramfs / test-matrix (qemu, basic) (push) Has been cancelled
Build Zero OS Initramfs / test-matrix (qemu, serial) (push) Has been cancelled
Added youki build and fromatting of scripts
2025-11-11 20:49:36 +01:00

60 lines
1.2 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 \
openssh-client \
wget \
curl \
tar \
gzip \
xz \
cpio \
binutils \
linux-headers \
musl-dev \
musl-utils \
pkgconfig \
openssl openssl-dev \
libseccomp libseccomp-dev \
perl \
shadow \
bash \
findutils \
grep \
sed \
coreutils \
diffutils \
flex \
bison \
bc \
elfutils-dev \
ncurses-dev \
kmod \
sqlite \
minio-client \
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}"
CMD ["/bin/bash"]