Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/airgap/create-airgap-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,25 @@ if [ $# -eq 1 ]; then

# Save pulled images to a tarball
echo "Creating ${images_file} with $(echo ${pulled} | wc -w | tr -d '[:space:]') images"
docker save $(echo ${pulled}) | gzip --stdout > ${images_file} || handle_error "Failed to create tarball: ${images_file}"
echo "Starting docker save operation at $(date)"
echo "Images to save: ${pulled}"
echo "Output file: ${images_file}"

# Check available disk space before starting
echo "Available disk space:"
df -h .

# Run docker save with explicit error handling
if docker save $(echo ${pulled}) | gzip --stdout > ${images_file}; then
echo "Successfully created tarball: ${images_file} at $(date)"
echo "Tarball size: $(ls -lh ${images_file} | awk '{print $5}')"
else
echo "ERROR: docker save command failed at $(date)"
echo "Exit code: $?"
echo "Available disk space after failure:"
df -h .
handle_error "Failed to create tarball: ${images_file}"
fi

# Remove temporary file
rm "${pulled_file}" || handle_error "Failed to remove temporary file: ${pulled_file}"
Expand Down