修改dokcer文件

This commit is contained in:
2025-07-06 17:19:51 +08:00
parent bad0a02d30
commit e7c4739462
3 changed files with 8 additions and 8 deletions

8
Jenkinsfile vendored
View File

@ -4,7 +4,7 @@ pipeline {
maven 'M3'
}
environment {
APP_NAME = "sczx-gateway"
APP_NAME = "sczx_gateway"
DOCKER_IMAGE = "${APP_NAME}:latest"
CONTAINER_NAME = "${APP_NAME}-container"
}
@ -50,9 +50,9 @@ pipeline {
steps {
echo "🛑 正在停止旧容器..."
sh '''
if [ "$(docker ps -f 'name=sczx-gateway-container' --format '{{.Status}}')" ]; then
docker stop sczx-gateway-container
docker rm sczx-gateway-container
if [ "$(docker ps -f 'name=sczx_gateway-container' --format '{{.Status}}')" ]; then
docker stop sczx_gateway-container
docker rm sczx_gateway-container
fi
'''
}