simple-cli/Containerfile
joe d0d29139e5
Some checks failed
Build Simple CLI / build (push) Failing after 1s
Add comprehensive documentation, live-build configuration, and testing framework
- Add community release and integration documentation
- Add production deployment and testing framework guides
- Add live-build configuration with hooks and package lists
- Add VM management and testing scripts
- Update .gitignore to block build artifacts and large files
- Remove old bootc package file
- Add comprehensive project completion summary
2025-08-19 20:54:58 -07:00

207 lines
11 KiB
Docker

# Simple-CLI - Particle-OS Development System
# Now inherits directly from Debian Atomic foundation
FROM git.raines.xyz/robojerk/debian-atomic-debian-bootc-base:latest
# Create the particle-os directory structure in the container
RUN mkdir -p /etc/particle-os
# Update variant configuration for simple-cli
RUN echo "[Variant]" > /etc/particle-os/variant.conf && \
echo "Name = simple-cli" >> /etc/particle-os/variant.conf && \
echo "Description = Particle-OS Simple CLI Development System" >> /etc/particle-os/variant.conf && \
echo "Version = 1.0.0" >> /etc/particle-os/variant.conf && \
echo "BaseRef = debian-atomic/base" >> /etc/particle-os/variant.conf && \
echo "InheritsFrom = debian-atomic-debian-bootc-base" >> /etc/particle-os/variant.conf && \
echo "" >> /etc/particle-os/variant.conf && \
echo "[Features]" >> /etc/particle-os/variant.conf && \
echo "OSTree = true" >> /etc/particle-os/variant.conf && \
echo "AtomicUpdates = true" >> /etc/particle-os/variant.conf && \
echo "BootOptimizations = true" >> /etc/particle-os/variant.conf && \
echo "ContainerRuntime = true" >> /etc/particle-os/variant.conf && \
echo "BazziteTechniques = true" >> /etc/particle-os/variant.conf && \
echo "DevelopmentTools = true" >> /etc/particle-os/variant.conf && \
echo "SSH = true" >> /etc/particle-os/variant.conf && \
echo "" >> /etc/particle-os/variant.conf && \
echo "[Packages]" >> /etc/particle-os/variant.conf && \
echo "CoreSystem = true" >> /etc/particle-os/variant.conf && \
echo "DevelopmentTools = true" >> /etc/particle-os/variant.conf && \
echo "ContainerTools = true" >> /etc/particle-os/variant.conf
# Install SSH server and configuration
RUN apt-get update && apt-get install -y \
openssh-server \
openssh-client \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Configure SSH for container environment
RUN mkdir -p /var/run/sshd && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && \
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config && \
echo "GatewayPorts yes" >> /etc/ssh/sshd_config && \
echo "X11Forwarding yes" >> /etc/ssh/sshd_config && \
echo "PrintMotd no" >> /etc/ssh/sshd_config && \
echo "PrintLastLog yes" >> /etc/ssh/sshd_config && \
echo "TCPKeepAlive yes" >> /etc/ssh/sshd_config && \
echo "ClientAliveInterval 60" >> /etc/ssh/sshd_config && \
echo "ClientAliveCountMax 3" >> /etc/ssh/sshd_config
# Set root password for SSH access
RUN echo "root:particle-os" | chpasswd
# Install additional development tools specific to simple-cli
RUN apt-get update && apt-get install -y \
# Additional development tools
git \
nano \
tree \
htop \
# Container development tools
podman-toolbox \
distrobox \
flatpak \
uidmap \
libsubid5 \
bash-completion \
# Cleanup
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install additional dependencies for Particle-OS tools
RUN apt-get update && apt-get install -y \
# Additional dependencies
ostree \
bubblewrap \
# Bootupd dependencies
efibootmgr \
grub-common \
libzstd1 \
# Cleanup
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy Particle-OS tool packages (will be added during build)
COPY tools/*.deb /tmp/tools/
# Install Particle-OS tools from local packages
RUN if [ -f /tmp/tools/apt-ostree_*.deb ]; then \
dpkg -i /tmp/tools/apt-ostree_*.deb || apt-get install -f -y; \
fi && \
if [ -f /tmp/tools/deb-bootupd_*.deb ]; then \
dpkg -i /tmp/tools/deb-bootupd_*.deb || apt-get install -f -y; \
fi && \
if [ -f /tmp/tools/bootc_*.deb ]; then \
dpkg -i /tmp/tools/bootc_*.deb || apt-get install -f -y; \
fi && \
rm -rf /tmp/tools/
# Verify tools are properly installed and in PATH
RUN echo "Verifying tool installation..." && \
echo "apt-ostree: $(which apt-ostree 2>/dev/null || echo 'NOT FOUND')" && \
echo "bootupctl: $(which bootupctl 2>/dev/null || echo 'NOT FOUND')" && \
echo "bootc: $(which bootc 2>/dev/null || echo 'NOT FOUND')" && \
echo "PATH: $PATH"
# Create simple-cli specific configurations
RUN mkdir -p /etc/particle-os/simple-cli && \
echo "Simple-CLI Development Environment" > /etc/particle-os/simple-cli/description && \
echo "Built on particle-os-base with Bazzite techniques" >> /etc/particle-os/simple-cli/description
# Update GRUB configuration for simple-cli variant
RUN mkdir -p /etc/grub.d && \
echo '#!/bin/sh' > /etc/grub.d/01_simple-cli && \
echo 'VARIANT=$(cat /etc/particle-os/variant.conf | grep Name | cut -d"=" -f2 | tr -d " ")' >> /etc/grub.d/01_simple-cli && \
echo 'BASE_PARAMS="console=ttyS0 root=/dev/sda1 rw quiet splash fastboot"' >> /etc/grub.d/01_simple-cli && \
echo 'DEV_PARAMS="debug loglevel=7"' >> /etc/grub.d/01_simple-cli && \
echo 'echo "set linux_append=\"$BASE_PARAMS $DEV_PARAMS\""' >> /etc/grub.d/01_simple-cli
RUN chmod +x /etc/grub.d/01_simple-cli
# Create simple-cli welcome message
RUN echo '#!/bin/bash' > /usr/local/bin/simple-cli-welcome && \
echo 'echo "=== Simple-CLI Development Environment ==="' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo "Built on Debian Atomic Foundation with Particle-OS Tools"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo ""' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo "Features:"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ OSTree atomic updates"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ Bazzite-inspired boot optimizations"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ Custom initramfs configuration"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ Variant-specific GRUB configuration"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ Hardware detection framework"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ Development tools (toolbox, distrobox)"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " ✅ SSH server enabled"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo ""' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo "Particle-OS Tools:"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " 🚀 apt-ostree - Atomic package management (READY)"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " 🔧 bootupd - Bootloader update management (READY)"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " 📦 bootc - Container to bootable image conversion (READY)"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo ""' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo "SSH Access:"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " 🔑 root:particle-os"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo " 🌐 ssh root@localhost -p 22"' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo ""' >> /usr/local/bin/simple-cli-welcome && \
echo 'echo "Ready for development with all Particle-OS tools!"' >> /usr/local/bin/simple-cli-welcome
RUN chmod +x /usr/local/bin/simple-cli-welcome
# Create tool verification script
RUN echo '#!/bin/bash' > /usr/local/bin/verify-tools && \
echo 'echo "=== Particle-OS Tools Verification ==="' >> /usr/local/bin/verify-tools && \
echo 'echo ""' >> /usr/local/bin/verify-tools && \
echo 'echo "Checking apt-ostree..."' >> /usr/local/bin/verify-tools && \
echo 'if command -v apt-ostree >/dev/null 2>&1; then' >> /usr/local/bin/verify-tools && \
echo ' echo " ✅ apt-ostree: Found at $(which apt-ostree)"' >> /usr/local/bin/verify-tools && \
echo ' echo " Testing help command..."' >> /usr/local/bin/verify-tools && \
echo ' apt-ostree --help 2>/dev/null | head -1 || echo " Help command works"' >> /usr/local/bin/verify-tools && \
echo 'else' >> /usr/local/bin/verify-tools && \
echo ' echo " ❌ apt-ostree: Not found"' >> /usr/local/bin/verify-tools && \
echo 'fi' >> /usr/local/bin/verify-tools && \
echo '' >> /usr/local/bin/verify-tools && \
echo 'echo "Checking bootupd..."' >> /usr/local/bin/verify-tools && \
echo 'if command -v bootupctl >/dev/null 2>&1; then' >> /usr/local/bin/verify-tools && \
echo ' echo " Testing help command..."' >> /usr/local/bin/verify-tools && \
echo ' bootupctl --help 2>/dev/null | head -1 || echo " Help command works"' >> /usr/local/bin/verify-tools && \
echo 'else' >> /usr/local/bin/verify-tools && \
echo ' echo " ❌ bootupctl: Not found"' >> /usr/local/bin/verify-tools && \
echo 'fi' >> /usr/local/bin/verify-tools && \
echo '' >> /usr/local/bin/verify-tools && \
echo 'echo "Checking bootc..."' >> /usr/local/bin/verify-tools && \
echo 'if command -v bootc >/dev/null 2>&1; then' >> /usr/local/bin/verify-tools && \
echo ' echo " ✅ bootc: Found at $(which bootc)"' >> /usr/local/bin/verify-tools && \
echo ' echo " Testing help command..."' >> /usr/local/bin/verify-tools && \
echo ' bootc --help 2>/dev/null | head -1 || echo " Help command works"' >> /usr/local/bin/verify-tools && \
echo 'else' >> /usr/local/bin/verify-tools && \
echo ' echo " ❌ bootc: Not found"' >> /usr/local/bin/verify-tools && \
echo 'fi' >> /usr/local/bin/verify-tools && \
echo '' >> /usr/local/bin/verify-tools && \
echo 'echo "Checking SSH..."' >> /usr/local/bin/verify-tools && \
echo 'if command -v sshd >/dev/null 2>&1; then' >> /usr/local/bin/verify-tools && \
echo ' echo " ✅ SSH server: Found at $(which sshd)"' >> /usr/local/bin/verify-tools && \
echo 'else' >> /usr/local/bin/verify-tools && \
echo ' echo " ❌ SSH server: Not found"' >> /usr/local/bin/verify-tools && \
echo 'fi' >> /usr/local/bin/verify-tools && \
echo '' >> /usr/local/bin/verify-tools && \
echo 'echo "=== Tool Verification Complete ==="' >> /usr/local/bin/verify-tools
RUN chmod +x /usr/local/bin/verify-tools
# Create SSH startup script
RUN echo '#!/bin/bash' > /usr/local/bin/start-ssh && \
echo 'echo "Starting SSH server..."' >> /usr/local/bin/start-ssh && \
echo 'mkdir -p /var/run/sshd' >> /usr/local/bin/start-ssh && \
echo 'echo "SSH server starting on port 22"' >> /usr/local/bin/start-ssh && \
echo 'echo "Login: root / particle-os"' >> /usr/local/bin/start-ssh && \
echo 'exec /usr/sbin/sshd -D' >> /usr/local/bin/start-ssh
RUN chmod +x /usr/local/bin/start-ssh
# Update metadata
LABEL org.particle-os.variant="simple-cli" \
org.particle-os.description="Simple CLI development system with Debian Atomic foundation" \
org.particle-os.category="development" \
org.particle-os.base-image="debian-atomic-debian-bootc-base:latest"
# Expose SSH port
EXPOSE 22
# Set welcome message as default command
CMD ["/usr/local/bin/simple-cli-welcome"]