Add missing files and complete Debian fork setup - Add missing test files and directories - Add missing configuration files - Complete Debian-specific adaptations - Replace Red Hat/Fedora tooling with Debian equivalents - Add comprehensive test suite for Debian bootc-image-builder
This commit is contained in:
parent
3326d796f0
commit
59ffbbc4d0
41 changed files with 10856 additions and 8 deletions
31
devel/Containerfile
Normal file
31
devel/Containerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM debian:bookworm AS builder
|
||||
RUN apt-get update && apt-get install -y git golang-go gpgme1.0-dev libassuan-dev && mkdir -p /build/bib
|
||||
COPY bib/go.mod bib/go.sum /build/bib/
|
||||
ARG GOPROXY=https://proxy.golang.org,direct
|
||||
RUN go env -w GOPROXY=$GOPROXY
|
||||
RUN cd /build/bib && go mod download
|
||||
# Copy the entire dir to avoid having to conditionally include ".git" as that
|
||||
# will not be available when tests are run under tmt
|
||||
COPY . /build
|
||||
WORKDIR /build
|
||||
RUN ./build.sh
|
||||
|
||||
FROM debian:bookworm
|
||||
# Install osbuild and dependencies
|
||||
COPY ./package-requires.txt .
|
||||
RUN apt-get update && grep -vE '^#' package-requires.txt | xargs apt-get install -y && rm -f package-requires.txt && apt-get clean
|
||||
COPY --from=builder /build/bin/* /usr/bin/
|
||||
COPY bib/data /usr/share/bootc-image-builder
|
||||
|
||||
ENTRYPOINT ["/usr/bin/bootc-image-builder"]
|
||||
VOLUME /output
|
||||
WORKDIR /output
|
||||
VOLUME /store
|
||||
VOLUME /rpmmd
|
||||
VOLUME /var/lib/containers/storage
|
||||
|
||||
LABEL description="This tools allows to build and deploy disk-images from bootc container inputs."
|
||||
LABEL io.k8s.description="This tools allows to build and deploy disk-images from bootc container inputs."
|
||||
LABEL io.k8s.display-name="Debian Bootc Image Builder"
|
||||
LABEL io.openshift.tags="base debian-bookworm"
|
||||
LABEL summary="A container to create disk-images from bootc container inputs"
|
||||
4
devel/Containerfile.hack
Normal file
4
devel/Containerfile.hack
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
FROM debian:bookworm
|
||||
RUN apt-get update && apt-get install -y git golang-go
|
||||
WORKDIR /src
|
||||
CMD ["/bin/bash"]
|
||||
10
devel/README.md
Normal file
10
devel/README.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Development Environment
|
||||
|
||||
This directory contains development and debugging tools for deb-bootc-image-builder.
|
||||
|
||||
## Contents
|
||||
|
||||
- `Containerfile` - Development container definition
|
||||
- `Containerfile.hack` - Quick hack container for testing
|
||||
- `Troubleshooting.md` - Common issues and solutions
|
||||
- `bootc-install` - Bootc installation script
|
||||
33
devel/Troubleshooting.md
Normal file
33
devel/Troubleshooting.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Troubleshooting
|
||||
|
||||
Common issues and solutions when working with deb-bootc-image-builder.
|
||||
|
||||
## Build Issues
|
||||
|
||||
### Go module download failures
|
||||
If you encounter issues with Go module downloads, ensure your GOPROXY is set correctly:
|
||||
```bash
|
||||
export GOPROXY=https://proxy.golang.org,direct
|
||||
```
|
||||
|
||||
### Permission issues
|
||||
Some operations may require elevated privileges. Ensure you have the necessary permissions or use sudo where appropriate.
|
||||
|
||||
## Runtime Issues
|
||||
|
||||
### Container storage issues
|
||||
If you encounter container storage issues, check that the required volumes are properly mounted and accessible.
|
||||
|
||||
### Package installation failures
|
||||
Ensure your Debian package sources are up to date:
|
||||
```bash
|
||||
apt-get update
|
||||
```
|
||||
|
||||
## Test Issues
|
||||
|
||||
### Integration test failures
|
||||
Integration tests require specific dependencies. Ensure all test dependencies are installed as outlined in the main README.
|
||||
|
||||
### Cross-architecture build issues
|
||||
Cross-architecture builds require proper Go toolchain setup. Ensure GOOS and GOARCH are properly configured.
|
||||
18
devel/bootc-install
Executable file
18
devel/bootc-install
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# Debian-specific bootc installation script
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Installing bootc on Debian system..."
|
||||
|
||||
# Update package lists
|
||||
apt-get update
|
||||
|
||||
# Install required dependencies
|
||||
apt-get install -y curl ostree
|
||||
|
||||
# Download and install bootc
|
||||
curl -L https://github.com/containers/bootc/releases/latest/download/bootc-x86_64-unknown-linux-gnu.tar.gz | tar -xz
|
||||
install -m 755 bootc /usr/local/bin/
|
||||
|
||||
echo "bootc installation completed successfully!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue