-
Notifications
You must be signed in to change notification settings - Fork 25
Adds another bootc example to documentation #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine from a quick read
|
||
This example walks through building and booting a Fedora IoT bootc image in a Podman machine. | ||
|
||
To start, create a clone of the https://gitlab.com/fedora/bootc/base-images[Fedora Bootc Base Images] Git repository. This includes the Fedora |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking out the git repo shouldn't be necessary; the manifests should be embedded in the builder
container image below. (Which needs to be changed...)
---- | ||
FROM localhost/fedora-bootc as builder | ||
RUN /usr/libexec/bootc-base-imagectl build-rootfs --manifest=fedora-iot /target-rootfs | ||
|
||
FROM scratch | ||
COPY --from=builder /target-rootfs/ / | ||
LABEL containers.bootc 1 | ||
ENV container=oci | ||
STOPSIGNAL SIGRTMIN+3 | ||
CMD ["/sbin/init"] | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a note above this to the effect of "This example is based on the Fedora bootc documentation about building scratch images; reference the upstream docs here for the latest version/information"
I had to swap out the builder
image to use the images in the fedora-testing
org on Quay; my Containerfile looks like:
FROM quay.io/fedora-testing/fedora-bootc:rawhide-standard as builder
RUN /usr/libexec/bootc-base-imagectl build-rootfs --manifest=fedora-iot /target-rootfs
FROM scratch
COPY --from=builder /target-rootfs/ /
RUN bootc container lint
LABEL containers.bootc 1
LABEL ostree.bootable 1
STOPSIGNAL SIGRTMIN+3
CMD ["/sbin/init"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be another note about using fedora-testing
here...
Ideally, we should be able to use quay.io/fedora/fedora-bootc:latest
, but that image on the registry is missing the /usr/libexec/bootc-base-imagectl
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So did you circumvent building fedora-bootc entirely then? This is your Containerfile for the iot image right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I just saw your comment below, I think that answers my question
user-docs/modules/ROOT/pages/fedora-iot-bootc-pmachine-example.adoc
Outdated
Show resolved
Hide resolved
This example walks through building and booting a Fedora IoT bootc image using Quay.io, as well as pushing an update to a booted | ||
Fedora IoT system. | ||
|
||
To start, clone the https://gitlab.com/fedora/bootc/base-images[Fedora Bootc Base Images] Git repository. This includes the Fedora | ||
IoT package manifest we will use to create our Fedora IoT bootc image. | ||
|
||
Within this clone, create a `Containerfile.custom` with the following contents: | ||
---- | ||
FROM localhost/fedora-bootc as builder | ||
RUN /usr/libexec/bootc-base-imagectl build-rootfs --manifest=fedora-iot /target-rootfs | ||
|
||
FROM scratch | ||
COPY --from=builder /target-rootfs/ / | ||
LABEL containers.bootc 1 | ||
ENV container=oci | ||
STOPSIGNAL SIGRTMIN+3 | ||
CMD ["/sbin/init"] | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment on the fedora-iot-bootc-pmachine-example.adoc
file about changes that should be made here as well
user-docs/modules/ROOT/pages/fedora-iot-bootc-quay-example.adoc
Outdated
Show resolved
Hide resolved
user-docs/modules/ROOT/pages/fedora-iot-bootc-quay-example.adoc
Outdated
Show resolved
Hide resolved
user-docs/modules/ROOT/pages/fedora-iot-bootc-quay-example.adoc
Outdated
Show resolved
Hide resolved
user-docs/modules/ROOT/pages/fedora-iot-bootc-quay-example.adoc
Outdated
Show resolved
Hide resolved
CMD ["/sbin/init"] | ||
---- | ||
|
||
Next, build a `localhost/fedora-bootc` image using the command below. This is required for building your Fedora IoT bootc image, as the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the builder
image is changed as suggested, you don't need to build your own builder
image, so you can drop some of these steps...
(I realized this after commenting about the sudo
command)
|
||
Now, boot your Fedora IoT bootc image. Open a new terminal window and run: | ||
---- | ||
podman-bootc run --filesystem=ext4 quay.io/[repository name]:fedora-iot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that podman-bootc
is packaged in Fedora...
You may want to link to the upstream repo where the install instructions are or change this section to cover building a disk image with bootc-image-builder
and provisioning a VM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should align our guide to the bootc docs, so I would like to see some changes made
Signed-off-by: djach7 <[email protected]>
Follow up to #95.
ext4