refactored structure

This commit is contained in:
Torben Haack
2024-10-10 06:17:26 +02:00
parent d3063864f3
commit e72c0ed92a
4 changed files with 45 additions and 13 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
# Specify the image name and tag
IMAGE_NAME="myp-rp"
IMAGE_TAG="latest"
# Specify the output file name
OUTPUT_FILE="myp-rp_latest.tar.xz"
# Save the Docker image and compress it with xz
docker save ${IMAGE_NAME}:${IMAGE_TAG} | xz -z -T0 > ./${OUTPUT_FILE}
# Check if the operation was successful
if [ $? -eq 0 ]; then
echo "Image successfully saved and compressed to ${OUTPUT_FILE}"
else
echo "Error occurred while saving and compressing the image"
fi