58 lines · 2.8 KB · Text
RawDownload
#!/bin/sh if [ "$OVERTE" = "" ]; then	OVERTE=`realpath ../..`fi GITSRC=`git -C $OVERTE/source config --get remote.origin.url | cut -d':' -f 2`GITDATE=`git -C $OVERTE/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`GITCOMMIT=`git -C $OVERTE/source rev-parse HEAD | cut -c 1-7` sudo apt-get install chrpath binutils DOCK_BUILD_ROOT=temp-make-dockrm -r temp-make-dockmkdir -p $DOCK_BUILD_ROOTcp $OVERTE/source/pkg-scripts/Dockerfile.templ $DOCK_BUILD_ROOT/Dockerfilecp $OVERTE/source/pkg-scripts/docker-entrypoint.sh $DOCK_BUILD_ROOT/entrypoint.shcp $OVERTE/source/pkg-scripts/docker-overte-supervisor.conf $DOCK_BUILD_ROOT/overte.conf # copy the files overmkdir -p $DOCK_BUILD_ROOT/optcp $OVERTE/build/assignment-client/assignment-client $DOCK_BUILD_ROOT/optcp $OVERTE/build/domain-server/domain-server $DOCK_BUILD_ROOT/optcp $OVERTE/build/tools/oven/oven $DOCK_BUILD_ROOT/opt#cp $OVERTE/build/ice-server/ice-server $DOCK_BUILD_ROOT/optstrip --strip-all $DOCK_BUILD_ROOT/opt/*chrpath -d $DOCK_BUILD_ROOT/opt/* cp -a $OVERTE/build/assignment-client/plugins $DOCK_BUILD_ROOT/optstrip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*.sochrpath -d $DOCK_BUILD_ROOT/opt/plugins/*.sostrip --strip-all $DOCK_BUILD_ROOT/opt/plugins/*/*.sochrpath -d $DOCK_BUILD_ROOT/opt/plugins/*/*.so cp -a $OVERTE/source/domain-server/resources $DOCK_BUILD_ROOT/optfind $DOCK_BUILD_ROOT/opt/resources -name ".gitignore" -deletefind $DOCK_BUILD_ROOT/opt/resources -type f -executable -exec sh -c 'chmod -x {}' \; mkdir -p $DOCK_BUILD_ROOT/libcp $OVERTE/build/libraries/*/*.so $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Network.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Core.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Widgets.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Gui.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Script.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5WebSockets.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5Qml.so.*.*.* $DOCK_BUILD_ROOT/libcp $OVERTE/qt5-install/lib/libQt5ScriptTools.so.*.*.* $DOCK_BUILD_ROOT/libchmod +x $DOCK_BUILD_ROOT/lib/*strip --strip-all $DOCK_BUILD_ROOT/lib/*chrpath -d $DOCK_BUILD_ROOT/lib/*ldconfig -n $DOCK_BUILD_ROOT/lib SOFILES=`ls $DOCK_BUILD_ROOT/lib | sed 's/\./\\\./g' | paste -d'|' -s`DEPENDS=`find $DOCK_BUILD_ROOT/opt $DOCK_BUILD_ROOT/lib -type f -executable -exec sh -c 'objdump -p {} | grep NEEDED' \; | awk '{print $2}' | sort | uniq | egrep -v "^($SOFILES)$" | xargs -n 1 -I {} sh -c 'dpkg -S {} | head -n 1' | cut -d ':' -f 1 | sort | uniq | paste -d' ' -s` cd $DOCK_BUILD_ROOTdocker build -t odysseus654/overte-server --build-arg "DEPENDS=$DEPENDS" --build-arg "GITSRC=$GITSRC" --build-arg "GITDATE=$GITDATE" --build-arg "GITCOMMIT=$GITCOMMIT" .