Skip to content

Commit

Permalink
Add some code comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Aug 26, 2024
1 parent 3f32848 commit 9f5e228
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions images/hook-embedded/pull-images.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
#!/bin/bash

# This script is used to pull
# This script is used to build an image that is embedded in HookOS.
# The image contains the /var/lib/docker directory which has pulled images
# from the images.txt file. When HookOS boots up, the DinD container will
# have all the images in its cache.

# The purpose of doing this is so that EKS Anywhere doesn't have to set registry
# and registry credentials in each Hardware object.

# In my testing the initramfs for HookOS with these embedded images was about 334MB.
# The machine booting HookOS needed 6GB of RAM to boot up successfully.
# This script is used to build container images that are embedded in HookOS.
# When HookOS boots up, the DinD container will have all the images in its cache.

set -euo pipefail

Expand Down Expand Up @@ -44,6 +35,7 @@ function main() {
# Pull the images
while IFS=" " read -r first_image image_tag || [ -n "${first_image}" ] ; do
echo -e "----------------------- $first_image -----------------------"
# Remove the image if it exists so that the image pulls the correct architecture
docker_remove_image "${first_image}"
docker_pull_image "${first_image}" "${arch}"
done < "${images_file}"
Expand Down

0 comments on commit 9f5e228

Please sign in to comment.