16 lines
500 B
Bash
16 lines
500 B
Bash
|
app_name='ludu-job-admin'
|
||
|
# 定义应用版本
|
||
|
app_version='1.0.0'
|
||
|
# 定义应用环境
|
||
|
#profile_active='prod'
|
||
|
echo '----stop container----'
|
||
|
docker stop ${app_name}
|
||
|
echo '----rm container----'
|
||
|
docker rm ${app_name}
|
||
|
echo '----rm image----'
|
||
|
docker rmi ${app_name}:${app_version}
|
||
|
# 打包编译docker镜像
|
||
|
echo '----build image----'
|
||
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||
|
echo '----start container----'
|
||
|
docker run -d -p 9090:9090 --name ${app_name} ${app_name}:${app_version}
|