Files
zosbuilder/Dockerfile
Jan De Landtsheer 7cf0d070ef feat: Add perl for OpenSSL builds
- Add perl to Dockerfile for rfs OpenSSL compilation
- Clean up rustup environment (remove gcc complications)
- Ready for complete build debugging
2025-08-31 16:21:30 +02:00

46 lines
998 B
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 \
tar \
gzip \
xz \
cpio \
binutils \
linux-headers \
musl-dev \
musl-utils \
pkgconfig \
openssl-dev \
perl \
bash \
findutils \
grep \
sed \
coreutils
# 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"]