ludu-cloud/ludu-module-ticketing/ludu-module-ticketing-biz/run.sh

15 lines
521 B
Bash
Raw Permalink Normal View History

2024-08-13 14:36:48 +08:00
app_name='ludu-module-ticketing'
# 定义应用版本
app_version='1.0.0'
# 定义应用环境
2024-10-28 16:12:08 +08:00
# 打包编译docker镜像
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
2024-08-13 14:36:48 +08:00
echo '----stop container----'
docker stop ${app_name}
echo '----rm container----'
docker rm ${app_name}
2024-10-28 16:12:08 +08:00
echo '----rmi none image----'
docker rmi $(docker images -f "dangling=true" -q)
2024-08-13 14:36:48 +08:00
echo '----start container----'
2024-10-28 16:12:08 +08:00
docker run -d -p 48088:48088 --name ${app_name} --restart always ${app_name}:${app_version}