Skip to content

Commit 9137908

Browse files
authored
Merge pull request #200 from miabbott/faq
docs: initial FAQ entry
2 parents 04d0d7e + 2f9fbe8 commit 9137908

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

docs/faq.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
nav_order: 4
3+
---
4+
5+
# Frequently Asked Questions
6+
7+
## How do users include their own packages/binaries in a custom "bootc compatible" container?
8+
9+
The "bootc compatible" containers are OCI container images, so you can customize them in the same way you build containers today.
10+
11+
For example, using your own yum/dnf repo in a Dockerfile:
12+
13+
```Dockerfile
14+
FROM quay.io/redhat/rhel-base:10
15+
COPY custom.repo /etc/yum.repos.d/
16+
RUN dnf -y install custom-rpm & \
17+
dnf clean all && \
18+
ostree container commit
19+
```
20+
21+
Or using multi-stage builds in your Dockerfile:
22+
23+
```Dockerfile
24+
# Build a small Go program
25+
FROM registry.access.redhat.com/ubi8/ubi:latest as builder
26+
WORKDIR /build
27+
COPY . .
28+
RUN yum -y install go-toolset
29+
RUN go build hello-world.go
30+
31+
FROM quay.io/redhat/rhel-base:10
32+
COPY --from=builder /build/hello-world /usr/bin
33+
RUN ostree container commit
34+
```
35+
36+
You can find more examples at the [centos-boot-layered repo](https://github.com/CentOS/centos-boot-layered) repo or the [CoreOS layering-examples repo](https://github.com/coreos/layering-examples).
37+
38+
## How does the use of OCI artifacts intersect with this effort?
39+
40+
The "bootc compatible" images are OCI container images; they do not rely on the [OCI artifact specification](https://github.com/opencontainers/image-spec/blob/main/artifacts-guidance.md) or [OCI referrers API](https://github.com/opencontainers/distribution-spec/blob/main/spec.md#enabling-the-referrers-api).
41+
42+
It is foreseeable that users will need to produce "traditional" disk images (i.e. raw disk images, qcow2 disk images, Amazon AMIs, etc.) from the "bootc compatible" container images using additional tools. Therefore, it is reasonable that some users may want to encapsulate those disk images as an OCI artifact for storage and distribution. However, it is not a goal to use `bootc` to produce these "traditional" disk images nor to facilitate the encapsulation of those disk images as OCI artifacts.

0 commit comments

Comments
 (0)