This commit is contained in:
2024-08-21 11:45:12 +08:00
parent a330995c6d
commit 4961ce3f47
2 changed files with 4 additions and 14 deletions

View File

@@ -8,7 +8,9 @@ app_version=$DRONE_COMMIT
echo ${app_version}
# 打包编译docker镜像
echo '----build image start----'
docker build -t smartopsweb:${app_version} .
docker build -t smartopsweb:latest .
echo '----build image success----'
docker run -d -p 8080:80 smartopsweb:${app_version}
docker rm -f
docker rmi smartopsweb:latest
docker run --name smartopsweb -d -p 8080:80 smartopsweb:latest