Bootc switch issues
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 230
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 38
Description
At the bottom is a wrapper script I use to do podman build and bootc switch. Bug 1 is known I think, we have to do chcon to solve an selinux issue. Bug 2 is if you try and bootc switch to a container with the same name as the current one, it does nothing (even though one may have made an edit to the container image since, etc.). I workaround this by getting the sha from `podman images -q`, but it should be able to recognise it's not the same image as currently booted.
```
#!/bin/bash
main() {
set -exu -o pipefail
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
return 1
fi
podman build -t bootc -f Containerfile-bootc
# Bug 1, selinux issue, need to chcon
bootc usr-overlay || true
chcon --reference /usr/bin/rpm-ostree /usr/bin/bootc
# Bug 2, if you try a bootc switch to a new image with the same name
# nothing happens, use the sha from "podman images -q" to workaround it
local id="$(podman images -q localhost/bootc)"
bootc switch --transport containers-storage "$id"
}
main "$@"
```
Contributor guide
Assessment
This issue has not been assessed yet.