Browse Source

add a note on overriding base image

Grega Bremec 2 years ago
parent
commit
61e42e383a
1 changed files with 17 additions and 0 deletions
  1. 17 0
      README.adoc

+ 17 - 0
README.adoc

@@ -18,10 +18,23 @@ secret from).
 
 
 NOTE: The entitled system architecture needs to match the container host!
 NOTE: The entitled system architecture needs to match the container host!
 
 
+=== Building with Podman ===
+
 If building the images using `podman` on an entitled host, no extra steps need
 If building the images using `podman` on an entitled host, no extra steps need
 to be performed as host entitlements will automatically be imported into the
 to be performed as host entitlements will automatically be imported into the
 build container.
 build container.
 
 
+NOTE: When building for an architecture without the `ubi-minimal` image or on a
+      host that can not be entitled (f.e. Fedora CoreOS), you can choose a
+      different base image by using the `--from` option in `podman build`:
++
+[subs=+quotes]
+-------------------------------
+$ *podman build --from=registry.fedoraproject.org/fedora-minimal:36 -f ./images/Containerfile-sysstat -t collector-sysstat:latest*
+-------------------------------
+
+=== Building in OpenShift ===
+
 If building the images in OpenShift Container Platform, you must make sure an
 If building the images in OpenShift Container Platform, you must make sure an
 entitlement secret and corresponding RHSM certificate secret are mounted inside
 entitlement secret and corresponding RHSM certificate secret are mounted inside
 the build pod in order for packages to be found and installed.
 the build pod in order for packages to be found and installed.
@@ -86,6 +99,10 @@ kind: BuildConfig
 modification regardless of whether the build is running in `podman` on an
 modification regardless of whether the build is running in `podman` on an
 entitled host or inside a correctly configured OpenShift builder pod.
 entitled host or inside a correctly configured OpenShift builder pod.
 
 
+NOTE: Key thing in `Containerfile` steps is to remove `/etc/rhsm-host` at some
+      point unless `/etc/pki/entitlement-host` contains something (such as for
+      example, valid entitlemets). Both are symlinks to `/run/secrets`.
+
 === SAR ===
 === SAR ===
 
 
 Sar image is based on `ubi-minimal` and includes just the `sysstat` package.
 Sar image is based on `ubi-minimal` and includes just the `sysstat` package.