1 Star 0 Fork 25

哈喽/linker

forked from 少年郎秃头呀/linker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
publish-docker.sh 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
少年郎秃头呀 提交于 2024-11-22 17:23 . sync
target=$(cd $(dirname $0); pwd)
image="snltty/linker"
fs=('linker')
ps=('musl' 'debian')
rs=('x64' 'arm64' 'arm')
cd linker.web
npm install &&
npm run build &&
cd ../
for f in ${fs[@]}
do
for p in ${ps[@]}
do
for r in ${rs[@]}
do
rr=linux-${p}-${r}
if [ $p = "debian" ]
then
rr=linux-${r}
fi
dotnet publish ./${f} -c release -f net8.0 -o ./public/publish/docker/linux-${p}-${r}/${f} -r ${rr} --self-contained true -p:TieredPGO=true -p:DebugType=none -p:DebugSymbols=false -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -p:DebuggerSupport=false -p:EnableUnsafeBinaryFormatterSerialization=false -p:EnableUnsafeUTF7Encoding=false -p:HttpActivityPropagationSupport=false -p:InvariantGlobalization=true -p:MetadataUpdaterSupport=false -p:UseSystemResourceKeys=true -p:TrimMode=partial
cp -rf linker/Dockerfile-${p} public/publish/docker/linux-${p}-${r}/${f}/Dockerfile-${p}
cp -rf public/extends/any/web public/publish/docker/linux-${p}-${r}/${f}/web
mkdir -p public/publish/docker/linux-${p}-${r}/${f}/configs
mkdir -p public/publish/docker/linux-${p}-${r}/${f}/logs
if [ $p = "musl" ]
then
cp -rf linker/libmsquic-musl-${r}.so public/publish/docker/linux-${p}-${r}/${f}/libmsquic.so
fi
done
cd public/publish/docker/linux-${p}-x64/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-x64/${f}/Dockerfile-${p} --platform="linux/x86_64" --force-rm -t "${image}-${p}-x64:latest" -t "${image}-${p}-x64:v1.5.9" . --push
cd ../../../../../
cd public/publish/docker/linux-${p}-arm64/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm64/${f}/Dockerfile-${p} --platform="linux/arm64" --force-rm -t "${image}-${p}-arm64:latest" -t "${image}-${p}-arm64:v1.5.9" . --push
cd ../../../../../
cd public/publish/docker/linux-${p}-arm/${f}
docker buildx build -f ${target}/public/publish/docker/linux-${p}-arm/${f}/Dockerfile-${p} --platform="linux/arm/v7" --force-rm -t "${image}-${p}-arm:latest" -t "${image}-${p}-arm:v1.5.9" . --push
cd ../../../../../
done
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/lovemygirlkk99/linker.git
git@gitee.com:lovemygirlkk99/linker.git
lovemygirlkk99
linker
linker
master

搜索帮助