2024-09-30 10:45:36 +08:00
|
|
|
#!/bin/bash
|
2024-08-07 15:12:30 +08:00
|
|
|
app_name='zymall'
|
|
|
|
# 定义应用版本
|
|
|
|
app_version='1.0.0'
|
2024-09-25 17:59:13 +08:00
|
|
|
app_repository='mt.ptzykjgs.com:8080/serve'
|
2024-08-07 15:12:30 +08:00
|
|
|
# 定义应用环境
|
2024-09-30 10:45:36 +08:00
|
|
|
echo '----pull image----'
|
|
|
|
docker pull "${app_repository}/${app_name}:${app_version}"
|
2024-08-07 15:12:30 +08:00
|
|
|
echo '----stop container----'
|
|
|
|
docker stop ${app_name}
|
|
|
|
echo '----rm container----'
|
|
|
|
docker rm ${app_name}
|
2024-09-29 18:28:41 +08:00
|
|
|
#echo '----rm image----'
|
|
|
|
#docker rmi -f "${app_name}:${app_version}"
|
2024-08-07 15:12:30 +08:00
|
|
|
echo '----start container----'
|
2024-09-25 17:59:13 +08:00
|
|
|
docker run -d -p 6127:6127 --name ${app_name} --restart always "${app_repository}/${app_name}:${app_version}"
|