# Particle OS - Debian-based ublue-os system
FROM debian:trixie-slim

# Install core system packages
RUN apt-get update && apt-get install -y \
    systemd \
    systemd-sysv \
    udev \
    procps \
    util-linux \
    mount \
    passwd \
    login \
    bash \
    coreutils \
    ostree \
    ostree-boot \
    linux-image-amd64 \
    linux-headers-amd64 \
    initramfs-tools \
    curl \
    wget \
    vim \
    less \
    locales \
    ca-certificates \
    tzdata \
    && rm -rf /var/lib/apt/lists/*

# Configure locale
RUN locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8

# Configure timezone
ENV TZ=UTC

# Create user
RUN useradd -m -s /bin/bash particle

# Configure OSTree
RUN mkdir -p /usr/lib/ostree-boot

# Configure systemd
RUN systemctl enable systemd-networkd systemd-resolved

# Clean up
RUN rm -f /var/lib/dpkg/info/*.postinst \
    && rm -f /var/lib/dpkg/info/*.postrm \
    && rm -f /var/lib/dpkg/info/*.prerm

# Set default command
CMD ["/bin/bash"]
