Skip to content

Commit 67a2d6c

Browse files
Add some code comments
Signed-off-by: Jacob Weinstock <[email protected]>
1 parent de8a316 commit 67a2d6c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

images/hook-embedded/pull-images.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
#!/bin/bash
22

3-
# This script is used to pull
4-
# This script is used to build an image that is embedded in HookOS.
5-
# The image contains the /var/lib/docker directory which has pulled images
6-
# from the images.txt file. When HookOS boots up, the DinD container will
7-
# have all the images in its cache.
8-
9-
# The purpose of doing this is so that EKS Anywhere doesn't have to set registry
10-
# and registry credentials in each Hardware object.
11-
12-
# In my testing the initramfs for HookOS with these embedded images was about 334MB.
13-
# The machine booting HookOS needed 6GB of RAM to boot up successfully.
3+
# This script is used to build container images that are embedded in HookOS.
4+
# When HookOS boots up, the DinD container will have all the images in its cache.
145

156
set -euo pipefail
167

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

0 commit comments

Comments
 (0)