2023-09-05 10:00:41 +08:00
|
|
|
#!/bin/bash
|
|
|
|
# 用于缓存打包过程下载的依赖
|
|
|
|
mkdir repository
|
|
|
|
curDir=`pwd`
|
2023-09-20 01:03:56 +08:00
|
|
|
repository=${curDir}/repository
|
|
|
|
|
|
|
|
if ! test -e ${curDir}/gb28181-wvp-proxy-starter/ffmpeg;then
|
|
|
|
xz -d ${curDir}/ffmpeg/ffmpeg-git-amd64-static.tar.xz
|
|
|
|
tar -xvf ${curDir}/ffmpeg/ffmpeg-git-amd64-static.tar -C ${curDir}/ffmpeg/
|
|
|
|
mv ${curDir}/ffmpeg/ffmpeg-git*-static/* ${curDir}/ffmpeg
|
|
|
|
rm -rf ${curDir}/ffmpeg/ffmpeg-git*-static
|
|
|
|
mkdir -p ${curDir}/gb28181-wvp-proxy-starter/ffmpeg
|
|
|
|
cp ${curDir}/ffmpeg/ffmpeg ${curDir}/gb28181-wvp-proxy-starter/ffmpeg
|
|
|
|
cp ${curDir}/ffmpeg/ffprobe ${curDir}/gb28181-wvp-proxy-starter/ffmpeg
|
|
|
|
cp -r ${curDir}/ffmpeg/model ${curDir}/gb28181-wvp-proxy-starter/ffmpeg
|
|
|
|
fi
|
|
|
|
|
2023-09-05 10:00:41 +08:00
|
|
|
docker run --name maven --rm \
|
|
|
|
-v ${curDir}:/usr/src/mymaven \
|
2023-09-20 01:04:35 +08:00
|
|
|
-v ${repository}:/root/.m2/repository \
|
2023-09-05 10:00:41 +08:00
|
|
|
-v ${curDir}/settings.xml:/usr/share/maven/ref/settings.xml \
|
|
|
|
-v /etc/docker/daemon.json:/etc/docker/daemon.json -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker \
|
|
|
|
-w /usr/src/mymaven \
|
|
|
|
maven:3.9.3-eclipse-temurin-17-alpine \
|
|
|
|
mvn clean package -DskipTests -Pdocker
|
|
|
|
docker save skcks.cn/gb28181-docking-platform-proxy -o gb28181-docking-platform-proxy.image
|
|
|
|
ls -lh *.image
|