update deployment scripts
This commit is contained in:
parent
1f67acb667
commit
adc30f216a
@ -4,8 +4,8 @@
|
|||||||
IMAGE_NAME="myp-rp"
|
IMAGE_NAME="myp-rp"
|
||||||
IMAGE_TAG="latest"
|
IMAGE_TAG="latest"
|
||||||
|
|
||||||
# Specify the output file name
|
# Specify the output file name (changed extension to .tar)
|
||||||
OUTPUT_FILE="myp-rp_latest.tar.xz"
|
OUTPUT_FILE="myp-rp_latest.tar"
|
||||||
|
|
||||||
# Build the Docker image from Containerfile
|
# Build the Docker image from Containerfile
|
||||||
echo "Building Docker image from Containerfile..."
|
echo "Building Docker image from Containerfile..."
|
||||||
@ -19,15 +19,15 @@ fi
|
|||||||
|
|
||||||
echo "Docker image built successfully"
|
echo "Docker image built successfully"
|
||||||
|
|
||||||
# Save the Docker image and compress it with xz
|
# Save the Docker image without compression
|
||||||
echo "Saving and compressing the Docker image..."
|
echo "Saving the Docker image..."
|
||||||
docker save ${IMAGE_NAME}:${IMAGE_TAG} | xz -z -T0 > $PWD/docker/${OUTPUT_FILE}
|
docker save ${IMAGE_NAME}:${IMAGE_TAG} > $PWD/docker/${OUTPUT_FILE}
|
||||||
|
|
||||||
# Check if the save operation was successful
|
# Check if the save operation was successful
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Image successfully saved and compressed to ${OUTPUT_FILE}"
|
echo "Image successfully saved to ${OUTPUT_FILE}"
|
||||||
else
|
else
|
||||||
echo "Error occurred while saving and compressing the image"
|
echo "Error occurred while saving the image"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
IMAGE_NAME="myp-rp"
|
IMAGE_NAME="myp-rp"
|
||||||
IMAGE_TAG="latest"
|
IMAGE_TAG="latest"
|
||||||
|
|
||||||
# Specify the input file name
|
# Specify the input file name (changed extension to .tar)
|
||||||
INPUT_FILE="myp-rp_latest.tar.xz"
|
INPUT_FILE="myp-rp_latest.tar"
|
||||||
|
|
||||||
# Path to the docker directory
|
# Path to the docker directory
|
||||||
DOCKER_DIR="$PWD/docker"
|
DOCKER_DIR="$PWD/docker"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user