-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add ubuntu example image #45
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.
I think the cfsctl
command copied to /usr/bin
is going to be broken because there's no mkcomposefs
available on Ubuntu. In particular, pulling a new image and preparing it for booting probably won't work.
Can you please look into that? In all of the other examples, we can "install updates", but with mkcomposefs
unavailable I'm afraid it won't work for this one.
examples/bls/Containerfile.ubuntu
Outdated
RUN apt install -y kmod linux-base libelf1t64 | ||
RUN apt install -y curl | ||
# The cfsctl mount command depends on (currently pre-release) Linux 6.12 for support for directly mounting erofs images without creating loopback devices. | ||
RUN curl -O https://kernel.ubuntu.com/mainline/v6.12/amd64/linux-headers-6.12.0-061200-generic_6.12.0-061200.202411220723_amd64.deb |
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.
You should always give -L
to curl to handle redirects and --fail
to handle HTTP level errors instead of giving HTML back.
Use --remote-name-all
to download mutiple files at once too.
So combined:
RUN curl -Lf --remote-name-all https://kernel.ubuntu.com/mainline/v6.12/amd64/linux-headers-6.12.0-061200-generic_6.12.0-061200.202411220723_amd64.deb \
https://kernel.ubuntu.com/mainline/v6.12/amd64/linux-headers-6.12.0-061200_6.12.0-061200.202411220723_all.deb \
https://kernel.ubuntu.com/mainline/v6.12/amd64/linux-image-unsigned-6.12.0-061200-generic_6.12.0-061200.202411220723_amd64.deb \
https://kernel.ubuntu.com/mainline/v6.12/amd64/linux-modules-6.12.0-061200-generic_6.12.0-061200.202411220723_amd64.deb
It'll also avoid creating 4 separate TCP connections.
(Or of course, add a separate apt repo with these packages)
I just merged this: 60ff784#diff-8906835152921ef903f55779586f3a092362f65fca98df94d71801cf974ec95bR42 as a super janky way of getting composefs working on Ubuntu, for the GitHub actions runners, so we can CI the examples. It might be useful to do something less awful. Ideas:
|
For the record, the thing that should be possible is that you push your created container image to a registry somewhere, and then inside of the booted system image you can say something like: cfsctl oci pull docker://quay.io/your/image
cfsctl oci prepare-boot [image id] and then reboot and see the second image in the systemd-boot menu. It should even work to have separate OS installs (I tested this between the Fedora and Arch images, for example). |
It is so nice that we have CI to test the example builds. It been a long time ago, I didn't login launchpad. |
72cbd28
to
f403486
Compare
Thanks, I pushed to docker.io/shawn111/cfs-images:ubuntu.
|
Signed-off-by: Shawn Wang <[email protected]>
f403486
to
059e760
Compare
This is an example of ubuntu image referred to arch example.