spent some time doing research, reconfigure, and testing. New understanding
This commit is contained in:
parent
ec63937f20
commit
f6228e65a5
33 changed files with 5487 additions and 1881 deletions
|
|
@ -54,7 +54,8 @@ RUN apt-get update && apt-get install -y \
|
|||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create OSTree repository
|
||||
RUN ostree --repo=/ostree/repo init --mode=bare-user
|
||||
RUN mkdir -p /ostree/repo && \
|
||||
ostree --repo=/ostree/repo init --mode=bare-user
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /
|
||||
|
|
|
|||
|
|
@ -52,7 +52,8 @@ RUN apt-get update && apt-get install -y \
|
|||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create OSTree repository
|
||||
RUN ostree --repo=/ostree/repo init --mode=bare-user
|
||||
RUN mkdir -p /ostree/repo && \
|
||||
ostree --repo=/ostree/repo init --mode=bare
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /
|
||||
|
|
|
|||
97
variants/debian-bootc-base/Containerfile
Normal file
97
variants/debian-bootc-base/Containerfile
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# Debian bootc Base Image
|
||||
# Creates a bootc-compatible base starting from pure Debian
|
||||
|
||||
FROM debian:trixie-slim
|
||||
|
||||
# Label the image
|
||||
LABEL org.debian-atomic.variant="debian-bootc-base"
|
||||
LABEL org.debian-atomic.description="Debian bootc Base Image - Pure Debian with bootc components"
|
||||
LABEL org.debian-atomic.fedora-equivalent="fedora-bootc"
|
||||
|
||||
# Install essential system packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Core system components
|
||||
systemd systemd-sysv dbus util-linux \
|
||||
# Linux kernel and boot components
|
||||
linux-image-amd64 linux-headers-amd64 initramfs-tools \
|
||||
# Bootloader and UEFI support
|
||||
grub2 grub-pc efibootmgr \
|
||||
# OSTree components
|
||||
ostree ostree-boot \
|
||||
# Container runtime
|
||||
podman skopeo buildah \
|
||||
# Essential tools
|
||||
bash coreutils vim less curl wget sudo passwd \
|
||||
# Network and SSH
|
||||
network-manager iwd wireguard-tools openssh-client \
|
||||
# Development tools
|
||||
make gcc python3 python3-pip \
|
||||
# Clean up
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and install our bootc package
|
||||
COPY bootc_1.6.0-1~trixie1_amd64.deb /tmp/
|
||||
RUN dpkg -i /tmp/bootc_1.6.0-1~trixie1_amd64.deb || apt-get install -f -y && \
|
||||
rm /tmp/bootc_1.6.0-1~trixie1_amd64.deb && \
|
||||
echo "bootc installed successfully" && \
|
||||
bootc --version
|
||||
|
||||
# Initialize OSTree repository in the correct location for bootc
|
||||
RUN mkdir -p /sysroot/ostree/repo && \
|
||||
ostree --repo=/sysroot/ostree/repo init --mode=bare
|
||||
|
||||
# Add OSTree configuration
|
||||
COPY ostree-prepare-root.conf /usr/lib/ostree/prepare-root.conf
|
||||
RUN mkdir -p /etc/ostree && cp /usr/lib/ostree/prepare-root.conf /etc/ostree/prepare-root.conf
|
||||
RUN mkdir -p /usr/share/ostree && cp /usr/lib/ostree/prepare-root.conf /usr/share/ostree/prepare-root.conf
|
||||
|
||||
# Set up systemd as init
|
||||
RUN systemctl set-default multi-user.target
|
||||
|
||||
# Create a minimal OSTree commit for bootc
|
||||
# This is what bootc expects to find in the image
|
||||
RUN mkdir -p /tmp/ostree-root && \
|
||||
# Copy only essential system directories (exclude virtual filesystems)
|
||||
cp -r /usr /tmp/ostree-root/ && \
|
||||
cp -r /lib /tmp/ostree-root/ && \
|
||||
cp -r /bin /tmp/ostree-root/ && \
|
||||
cp -r /sbin /tmp/ostree-root/ && \
|
||||
cp -r /etc /tmp/ostree-root/ && \
|
||||
cp -r /var /tmp/ostree-root/ && \
|
||||
# Create essential directories that don't exist
|
||||
mkdir -p /tmp/ostree-root/tmp && \
|
||||
mkdir -p /tmp/ostree-root/run && \
|
||||
mkdir -p /tmp/ostree-root/dev && \
|
||||
mkdir -p /tmp/ostree-root/proc && \
|
||||
mkdir -p /tmp/ostree-root/sys && \
|
||||
mkdir -p /tmp/ostree-root/boot && \
|
||||
mkdir -p /tmp/ostree-root/root && \
|
||||
mkdir -p /tmp/ostree-root/home && \
|
||||
mkdir -p /tmp/ostree-root/srv && \
|
||||
mkdir -p /tmp/ostree-root/opt && \
|
||||
mkdir -p /tmp/ostree-root/mnt && \
|
||||
mkdir -p /tmp/ostree-root/media && \
|
||||
# Clean up temporary and unnecessary files
|
||||
rm -rf /tmp/ostree-root/var/cache/* && \
|
||||
rm -rf /tmp/ostree-root/var/log/* && \
|
||||
rm -rf /tmp/ostree-root/var/tmp/* && \
|
||||
rm -rf /tmp/ostree-root/tmp/* && \
|
||||
# Create the commit in the correct sysroot location
|
||||
COMMIT_HASH=$(ostree --repo=/sysroot/ostree/repo commit --orphan --subject='Debian bootc Base Image' /tmp/ostree-root) && \
|
||||
echo "OSTree commit created: $COMMIT_HASH" && \
|
||||
# Create a ref that bootc can find
|
||||
ostree --repo=/sysroot/ostree/repo refs --create=debian-atomic/base $COMMIT_HASH && \
|
||||
echo "OSTree ref created: debian-atomic/base" && \
|
||||
# Clean up
|
||||
rm -rf /tmp/ostree-root
|
||||
|
||||
# Verify the commit was created
|
||||
RUN echo "=== OSTree Repository Status ===" && \
|
||||
ostree --repo=/sysroot/ostree/repo refs && \
|
||||
ostree --repo=/sysroot/ostree/repo log debian-atomic/base
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
16
variants/debian-bootc-base/ostree-prepare-root.conf
Normal file
16
variants/debian-bootc-base/ostree-prepare-root.conf
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=OSTree prepare root
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=local-fs.target
|
||||
Before=sysinit.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/ostree/ostree-prepare-root /
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
47
variants/server/Containerfile
Normal file
47
variants/server/Containerfile
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Debian Atomic Server Variant (Minimal CLI)
|
||||
# Fedora CoreOS 1:1 parallel for Debian
|
||||
# Focus: Testing bootc, apt-ostree, bootupd
|
||||
|
||||
FROM localhost/debian-atomic-base:latest
|
||||
|
||||
# Create OSTree repository if it doesn't exist
|
||||
RUN mkdir -p /ostree/repo
|
||||
|
||||
# Set labels for Debian Atomic
|
||||
LABEL org.debian-atomic.variant="server"
|
||||
LABEL org.debian-atomic.description="Minimal Server CLI Environment"
|
||||
LABEL org.debian-atomic.fedora-equivalent="coreos"
|
||||
|
||||
# Install minimal server packages (avoid heavy desktop)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Core server tools
|
||||
openssh-server \
|
||||
nginx \
|
||||
postgresql-client \
|
||||
mariadb-client \
|
||||
redis-tools \
|
||||
# Monitoring and management
|
||||
htop \
|
||||
iotop \
|
||||
nethogs \
|
||||
# Network tools
|
||||
net-tools \
|
||||
iproute2 \
|
||||
iptables \
|
||||
# Development tools (minimal)
|
||||
git \
|
||||
vim \
|
||||
curl \
|
||||
wget \
|
||||
# Container tools
|
||||
docker.io \
|
||||
# Testing tools for our components
|
||||
systemd \
|
||||
systemd-sysv \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
72
variants/testing/Containerfile
Normal file
72
variants/testing/Containerfile
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# Debian Atomic Testing Variant
|
||||
# Focus: Testing bootc, apt-ostree, and bootupd
|
||||
# Fedora Atomic 1:1 parallel for Debian
|
||||
|
||||
FROM localhost/debian-atomic-base:latest
|
||||
|
||||
# Create OSTree repository if it doesn't exist
|
||||
RUN mkdir -p /ostree/repo
|
||||
|
||||
# Set labels for Debian Atomic
|
||||
LABEL org.debian-atomic.variant="testing"
|
||||
LABEL org.debian-atomic.description="Testing Environment for bootc, apt-ostree, bootupd"
|
||||
LABEL org.debian-atomic.fedora-equivalent="testing"
|
||||
|
||||
# Install testing tools and dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
# Testing and debugging tools
|
||||
strace \
|
||||
ltrace \
|
||||
gdb \
|
||||
valgrind \
|
||||
# Development tools
|
||||
build-essential \
|
||||
cmake \
|
||||
pkg-config \
|
||||
# Additional system tools
|
||||
systemd \
|
||||
systemd-sysv \
|
||||
# Clean up
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy Debian Atomic packages for testing
|
||||
COPY *.deb /tmp/deb_packages/
|
||||
|
||||
# Install Debian Atomic packages
|
||||
RUN cd /tmp/deb_packages && \
|
||||
# Install bootc (Fedora's bootc compiled on Debian)
|
||||
dpkg -i bootc_1.6.0-1~trixie1_amd64.deb || apt-get install -f -y && \
|
||||
# Install apt-ostreed (daemon component) first due to dependency
|
||||
# Temporarily commented out due to download issues
|
||||
# dpkg -i apt-ostreed_0.1.0+build1755398632.cff579876b0fd122f285e3362cdc0ed9abf46bdd_amd64.deb || apt-get install -f -y && \
|
||||
# Install apt-ostree (working build with full rpm-ostree CLI compatibility)
|
||||
dpkg -i apt-ostree_0.1.0+build88.a4a1873d_amd64.deb || apt-get install -f -y && \
|
||||
# Update package lists and install bootupd dependencies
|
||||
apt-get update && apt-get install -y efibootmgr grub-common libzstd1 && \
|
||||
# Install bootupd
|
||||
echo "Installing bootupd..." && \
|
||||
dpkg -i deb-bootupd_0.2.28-1_amd64.deb && \
|
||||
echo "bootupd installed successfully" && \
|
||||
# Clean up package files
|
||||
rm -rf /tmp/deb_packages && \
|
||||
# Verify installations
|
||||
echo "=== Installed Debian Atomic Components (Working Build 88) ===" && \
|
||||
bootc --version && \
|
||||
apt-ostree --help && \
|
||||
# apt-ostreed --help && \
|
||||
bootupctl --version
|
||||
|
||||
# Add OSTree configuration (required for bootc install)
|
||||
COPY ostree-prepare-root.conf /usr/lib/ostree/prepare-root.conf
|
||||
RUN mkdir -p /etc/ostree && cp /usr/lib/ostree/prepare-root.conf /etc/ostree/prepare-root.conf
|
||||
RUN mkdir -p /usr/share/ostree && cp /usr/lib/ostree/prepare-root.conf /usr/share/ostree/prepare-root.conf
|
||||
|
||||
# Initialize OSTree repository (minimal setup for bootc)
|
||||
RUN mkdir -p /ostree/repo && \
|
||||
ostree --repo=/ostree/repo init --mode=bare
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
||||
16
variants/testing/ostree-prepare-root.conf
Normal file
16
variants/testing/ostree-prepare-root.conf
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=OSTree prepare root
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=local-fs.target
|
||||
Before=sysinit.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/lib/ostree/ostree-prepare-root /
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
|
||||
[Install]
|
||||
WantedBy=sysinit.target
|
||||
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
FROM localhost/debian-atomic-base:latest
|
||||
|
||||
# Create OSTree repository if it doesn't exist
|
||||
RUN mkdir -p /ostree/repo
|
||||
|
||||
# Set labels for Debian Atomic
|
||||
LABEL org.debian-atomic.variant="workstation"
|
||||
LABEL org.debian-atomic.description="GNOME Desktop Environment"
|
||||
|
|
@ -31,7 +34,6 @@ RUN apt-get update && apt-get install -y \
|
|||
gnome-contacts \
|
||||
gnome-maps \
|
||||
firefox-esr \
|
||||
firefox-esr-l10n-en-us \
|
||||
totem \
|
||||
rhythmbox \
|
||||
cheese \
|
||||
|
|
@ -61,7 +63,6 @@ RUN apt-get update && apt-get install -y \
|
|||
cups \
|
||||
cups-client \
|
||||
system-config-printer \
|
||||
gnome-cups-manager \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue