17 lines
414 B
Bash
17 lines
414 B
Bash
#!/bin/sh
|
|
# 定义应用组名
|
|
group_name='clay'
|
|
# 定义应用名称
|
|
app_name=$DRONE_REPO_NAME
|
|
# 定义应用版本
|
|
app_version=$DRONE_COMMIT
|
|
echo ${app_version}
|
|
# 打包编译docker镜像
|
|
docker rm -f smartopsweb
|
|
docker rmi smartopsweb:latest
|
|
echo '----build image start----'
|
|
docker build -t smartopsweb:latest .
|
|
echo '----build image success----'
|
|
docker run --name smartopsweb -d -p 8080:80 smartopsweb:latest
|
|
|