README 完善

docker 打包调整
This commit is contained in:
shikong 2023-09-16 16:25:13 +08:00
parent 96732ed6fa
commit 0c16069ab1
5 changed files with 39 additions and 2 deletions

View File

@ -45,3 +45,28 @@ docker run --name gb28181-mocking --rm \
mvn deploy -DaltDeploymentRepository=amleixun-mvn-reop::default::file:H:/Repository/skcks.cn/gb28181-docking-platform-mvn-repo mvn deploy -DaltDeploymentRepository=amleixun-mvn-reop::default::file:H:/Repository/skcks.cn/gb28181-docking-platform-mvn-repo
``` ```
git push 推送即可 git push 推送即可
### 关于外置 ffmpeg 部分
项目仓库中自带一个 linux amd64 ffmpeg 用于docker打包
如果有其他平台需要可 修改位于 gb28181-mocking-starter 的 Dockerfile 文件
#### linux
linux 各发行版本可使用对应 官方源 安装
或者根据不同平台使用 https://www.johnvansickle.com/ffmpeg/ 提供的免编译版本
例:
amd64: https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
arm64: https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-arm64-static.tar.xz
#### windows
可到 ffmpeg.org 官网查找
或 到 github https://github.com/BtbN/FFmpeg-Builds/releases
下载对应版本
例:
win64: https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip

Binary file not shown.

View File

@ -6,6 +6,11 @@ ENV HOME_PATH /opt/gb28181-docking-platform-mocking/
RUN mkdir -p $HOME_PATH RUN mkdir -p $HOME_PATH
WORKDIR $HOME_PATH WORKDIR $HOME_PATH
RUN mkdir -p /usr/bin/ffmpeg
ADD ../ffmpeg/ffmpeg /usr/bin/ffmpeg/ffmpeg
ADD ../ffmpeg/ffprobe /usr/bin/ffmpeg/ffprobe
ADD ../ffmpeg/model /usr/bin/ffmpeg/model
ADD target/gb28181-mocking-starter.jar /opt/gb28181-docking-platform-mocking/starter.jar ADD target/gb28181-mocking-starter.jar /opt/gb28181-docking-platform-mocking/starter.jar
EXPOSE 18182 EXPOSE 18182

View File

@ -24,8 +24,8 @@ spring:
username: root username: root
password: 123456a password: 123456a
url: jdbc:mysql://192.168.1.241:3306/gb28181_docking_platform?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai url: jdbc:mysql://192.168.1.241:3306/gb28181_docking_platform?createDatabaseIfNotExist=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
profiles: # profiles:
active: local # active: local
gb28181: gb28181:
# 作为28181服务器的配置 # 作为28181服务器的配置

View File

@ -2,6 +2,13 @@
# 用于缓存打包过程下载的依赖 # 用于缓存打包过程下载的依赖
mkdir repository mkdir repository
curDir=`pwd` curDir=`pwd`
if ! test -e ffmpeg/ffmpeg;then
xz -d ffmpeg/ffmpeg-git-amd64-static.tar.xz
tar -xvf ffmpeg-git-amd64-static.tar -C ./
mv ffmpeg-git*-static/* ./
rm -rf ffmpeg-git*-static
fi
docker run --name maven --rm \ docker run --name maven --rm \
-v ${curDir}:/usr/src/mymaven \ -v ${curDir}:/usr/src/mymaven \
-v ${curDir}/repository:/root/.m2/repository \ -v ${curDir}/repository:/root/.m2/repository \