Update bin/docker-traverse.sh
This commit is contained in:
parent
f33b9a7afa
commit
9b4a2018c6
@ -29,12 +29,12 @@ function extract_docker_image {
|
||||
|
||||
# Save the Docker image as a tar file
|
||||
echo "Saving Docker image as a tar file..." >&2
|
||||
docker save "$1" -o "${DESTINATION}/${IMAGE_NAME}.tar"
|
||||
docker save "$1" -o "${DESTINATION}/image.tar"
|
||||
|
||||
# Extract the Docker image layers to the destination directory
|
||||
echo "Extracting Docker image layers..." >&2
|
||||
mkdir -p "${DESTINATION}/layers"
|
||||
tar -xf "${DESTINATION}/${IMAGE_NAME}.tar" -C "${DESTINATION}/"
|
||||
tar -xf "${DESTINATION}/image.tar" -C "${DESTINATION}/"
|
||||
|
||||
# Rename the layer directories to their respective layer IDs
|
||||
LAYERS=$(jq -r '.[0].Layers[]' "${MANIFEST}")
|
||||
|
Loading…
Reference in New Issue
Block a user