-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,37 @@ | ||
echo "Start make temp dir" | ||
mkdir -p /tmp/bot_build_temp | ||
|
||
echo "Start check download cache" | ||
if [ ! -f "/tmp/bot_build_temp/ffmpeg-n7.0.2-6-g7e69129d2f-linux64-gpl-shared-7.0.tar.xz" ]; then | ||
echo "File not found. Downloading..." | ||
echo "Start download ffmpeg" | ||
wget -O /tmp/bot_build_temp/ffmpeg-n7.0.2-6-g7e69129d2f-linux64-gpl-shared-7.0.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2024-08-31-12-50/ffmpeg-n7.0.2-6-g7e69129d2f-linux64-gpl-shared-7.0.tar.xz" | ||
fi | ||
|
||
echo "Start make local temp dir" | ||
mkdir -p ffmpeg | ||
|
||
tar --strip-components=1 -xf /tmp/bot_build_temp/ffmpeg-n7.0.2-6-g7e69129d2f-linux64-gpl-shared-7.0.tar.xz -C ffmpeg | ||
echo "Start decompress ffmpeg" | ||
tar --strip-components=1 -xf /tmp/bot_build_temp/ffmpeg-n7.0.2-6-g7e69129d2f-linux64-gpl-shared-7.0.tar.xz -C ./ffmpeg | ||
echo "End decompress" | ||
|
||
echo "Start process so files" | ||
rm ./ffmpeg/lib/*.so | ||
rm -r ./ffmpeg/lib/pkgconfig | ||
|
||
for file in ./ffmpeg/lib/*.so.*; do | ||
if [ -L "$file" ]; then | ||
target=$(readlink "$file") | ||
rm "$file" | ||
mv "./ffmpeg/lib/$target" "$file" | ||
fi | ||
done | ||
|
||
ls -l ./ffmpeg/lib | ||
echo "End process" | ||
|
||
echo "Start build docker image" | ||
sudo docker build . -f Dockerfile.base -t registry.cn-beijing.aliyuncs.com/nidb-cr/camera-capture-bot-base:7.0.2-6 | ||
echo "End build" | ||
|
||
echo "Start clean resources" | ||
rm -r ffmpeg |