You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/docker-build.sh

12 lines
295 B

4 years ago
#!/bin/sh
4 years ago
4 years ago
# 打包
4 years ago
mvn clean package
4 years ago
# 创建镜像
docker build -t gitee.com/sop .
# 获取镜像id
image_id=`docker images gitee.com/sop --format "{{.ID}}" | awk '{print $1}'`
# 运行镜像
4 years ago
docker run --name sop -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8087:8087 -p 2222:2222 -d $image_id