refactored structure
This commit is contained in:
18
packages/reservation-platform/docker/build_image.sh
Executable file
18
packages/reservation-platform/docker/build_image.sh
Executable 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
|
Reference in New Issue
Block a user