Files
zosbuilder/components/rfs/Dockerfile
Jan De Landtsheer 709c4a0865 feat: implement rootless Docker with container management support
Docker Infrastructure:
- Added proper user namespace mapping in Dockerfile.alpine
- Created 'builder' user with host UID/GID mapping at build time
- Removed runtime user mapping (now handled in Dockerfile)
- Set up Rust environment for mapped user instead of root
- Fixed config mount consistency (removed :ro flags for real-time sync)

Container Management:
- Added 15 essential cgroup modules to modules-essential.list
- Complete cgroups v1 and v2 support for container orchestration
- Process control: cgroup_pids, cgroup_freezer, cgroup_cpuset
- Memory management: memcg, hugetlb_cgroup
- Network control: net_cls_cgroup, net_prio_cgroup
- Device access: cgroup_device, devices_cgroup
- Advanced features: cgroup_bpf, cgroup_perf_event, cgroup_debug

Environment Updates:
- Updated RFS Dockerfile to Alpine 3.22 for consistency
- Ensured proper /build directory permissions for mapped user

This enables true rootless operation with full container management
capabilities, fixing permission issues and enabling Zero-OS container
orchestration with complete resource control.
2025-08-25 09:44:47 +02:00

22 lines
517 B
Docker

FROM rust:slim as builder
WORKDIR /src
COPY rfs /src/rfs
COPY Cargo.toml .
COPY Cargo.lock .
COPY config.toml .
RUN apt-get update && apt-get install curl build-essential libssl-dev musl-tools -y
RUN rustup target add x86_64-unknown-linux-musl
RUN cargo build --release --target=x86_64-unknown-linux-musl
FROM alpine:3.22
WORKDIR /app
COPY --from=builder /src/target/x86_64-unknown-linux-musl/release/rfs .
COPY --from=builder /src/config.toml .
ENTRYPOINT [ "./rfs", "server", "--config-path", "config.toml"]