update deployment scripts

This commit is contained in:
Torben Haack 2024-10-10 07:06:35 +02:00
parent 1f67acb667
commit adc30f216a
2 changed files with 9 additions and 9 deletions

View File

@ -4,8 +4,8 @@
IMAGE_NAME="myp-rp"
IMAGE_TAG="latest"
# Specify the output file name
OUTPUT_FILE="myp-rp_latest.tar.xz"
# Specify the output file name (changed extension to .tar)
OUTPUT_FILE="myp-rp_latest.tar"
# Build the Docker image from Containerfile
echo "Building Docker image from Containerfile..."
@ -19,15 +19,15 @@ fi
echo "Docker image built successfully"
# Save the Docker image and compress it with xz
echo "Saving and compressing the Docker image..."
docker save ${IMAGE_NAME}:${IMAGE_TAG} | xz -z -T0 > $PWD/docker/${OUTPUT_FILE}
# Save the Docker image without compression
echo "Saving the Docker image..."
docker save ${IMAGE_NAME}:${IMAGE_TAG} > $PWD/docker/${OUTPUT_FILE}
# Check if the save operation was successful
if [ $? -eq 0 ]; then
echo "Image successfully saved and compressed to ${OUTPUT_FILE}"
echo "Image successfully saved to ${OUTPUT_FILE}"
else
echo "Error occurred while saving and compressing the image"
echo "Error occurred while saving the image"
exit 1
fi

View File

@ -4,8 +4,8 @@
IMAGE_NAME="myp-rp"
IMAGE_TAG="latest"
# Specify the input file name
INPUT_FILE="myp-rp_latest.tar.xz"
# Specify the input file name (changed extension to .tar)
INPUT_FILE="myp-rp_latest.tar"
# Path to the docker directory
DOCKER_DIR="$PWD/docker"