mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
完善docker相关部署
This commit is contained in:
25
docker/ruoyi/modules/system/build.sh
Normal file
25
docker/ruoyi/modules/system/build.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the image name as a variable for easy modification
|
||||
IMAGE_NAME="ryas-system"
|
||||
|
||||
# Prompt the user to enter a version number (tag) for the image
|
||||
echo "Please enter the image version number (tag):"
|
||||
read TAG
|
||||
|
||||
# Check if the version number has been entered
|
||||
if [[ -z "$TAG" ]]; then
|
||||
echo "The image tag cannot be empty !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DOCKERFILE_DIR='.'
|
||||
|
||||
docker buildx build -t $IMAGE_NAME:$TAG $DOCKERFILE_DIR
|
||||
|
||||
echo
|
||||
echo "================================================"
|
||||
echo "The details of the built image are as follows:"
|
||||
echo
|
||||
docker images | grep "$IMAGE_NAME.*$TAG"
|
||||
|
||||
Reference in New Issue
Block a user