mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-13 21:36:46 +00:00
Inital commit.
This commit is contained in:
31
images/linux/scripts/helpers/containercache.sh
Normal file
31
images/linux/scripts/helpers/containercache.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# Check prereqs
|
||||
echo "Checking prereqs for image pulls"
|
||||
if ! command -v docker; then
|
||||
echo "Docker is not installed, cant pull images"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Information output
|
||||
systemctl status docker --no-pager
|
||||
|
||||
# Pull images
|
||||
images=(
|
||||
docker.io/jekyll/builder
|
||||
mcr.microsoft.com/azure-pipelines/node8-typescript
|
||||
)
|
||||
|
||||
for image in "${images[@]}"; do
|
||||
docker pull "$image"
|
||||
done
|
||||
|
||||
## Add container information to the metadata file
|
||||
DocumentInstalledItem "Cached container images"
|
||||
|
||||
while read -r line; do
|
||||
DocumentInstalledItemIndent "$line"
|
||||
done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')"
|
||||
Reference in New Issue
Block a user