allLikeMall/yudao-server/run.sh

16 lines
576 B
Bash
Raw Normal View History

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-10-16 15:00:14 +08:00
echo '----rmi none image----'
docker rmi $(docker images -f "dangling=true" -q)
2024-08-07 15:12:30 +08:00
echo '----start container----'
2024-10-16 15:00:14 +08:00
docker run -d -p 6127:6127 --name ${app_name} -v /home/mallpic:/home/mallpic --restart always "${app_repository}/${app_name}:${app_version}"