app_name='app.jar'
# 瀹氫箟搴旂敤鐗堟湰
app_version='1.0.0'
# 瀹氫箟搴旂敤鐜
#profile_active='prod'
echo '----copy jar----'
docker stop ${app_name}
echo '----stop container----'
docker rm ${app_name}
echo '----rm container----'
docker rmi ${group_name}/${app_name}:${app_version}
echo '----rm image----'
# 鎵撳寘缂栬瘧docker闀滃儚
docker build -t ${group_name}/${app_name}:${app_version} .
echo '----build image----'
docker run -p 9090:9090 --name ${app_name} \
-e TZ="Asia/Shanghai" \
-v /etc/localtime:/etc/localtime \
-v /mydata/app/${app_name}/logs:/var/logs \
-d ${group_name}/${app_name}:${app_version} \
echo '----start container----'