You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
<!--- Please describe what this PR is going to change -->
This adds the optional capability to embed container images into
hook-docker. This helps use cases where images already existing in the
DinD cache is needed. Air gap envs, latency constrained/concerned envs,
etc. Just FYI, with this change but without embedding any images the
final 6.6 kernel initramfs is 171 MB. The v0.9.0 initramfs is 178.9 MB
## Why is this needed
<!--- Link to issue you have raised -->
Fixes: #
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->
## How are existing users impacted? What migration steps/scripts do we
need?
<!--- Fixes a bug, unblocks installation, removes a component of the
stack etc -->
<!--- Requires a DB migration script, etc. -->
## Checklist:
I have:
- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,9 +160,21 @@ The `gha-matrix` CLI command prepares a set of JSON outputs for GitHub Actions m
160
160
-`DOCKER_ARCH` is used by the `linuxkit-containers` command to build the containers for the specified architecture.
161
161
-`DO_PUSH`: `yes` or `no`, will push the built containers to the OCI registry; defaults to `no`.
162
162
163
+
### Embedding container images into the DinD (docker-in-docker), also known as [hook-docker](images/hook-docker/), container
164
+
165
+
For use cases where having container images already available in Docker is needed, the following steps can be taken to embed container images into hook-docker (DinD):
166
+
167
+
> Note: This is optional and no container images will be embedded by default.
168
+
169
+
> Note: This will increase the overall size of HookOS. As HookOS is an in memory OS, make sure that the size increase works for the machines you are provisioning.
170
+
171
+
1. Create a file named `images.txt` in the [images/hook-embedded/](images/hook-embedded/) directory.
172
+
1. Populate this `images.txt` file with the list of images to be embedded. See [images/hook-embedded/images.txt.example](images/hook-embedded/images.txt.example) for details on the required file format.
173
+
1. Change directories to [images/hook-embedded/](images/hook-embedded/) and run [`pull-images.sh`](images/hook-embedded/pull-images.sh) script when building amd64 images and run [`pull-images.sh arm64`](images/hook-embedded/pull-images.sh) when building arm64 images. Read the comments at the top of the script for more details.
174
+
1. Change directories to the root of the HookOS repository and run `sudo ./build.sh build ...` to build the HookOS kernel and ramdisk. FYI, `sudo` is needed as DIND changes file ownerships to root.
175
+
163
176
### Build system TO-DO list
164
177
165
-
-[ ] Update to Linuxkit 1.2.0 and new linuxkit pkgs; this might lead into the containerd vs dind;
166
178
-[ ]`make debug` functionality (sshd enabled) was lost in the Makefile -> bash transition;
0 commit comments