是否可以压缩?
nkta3m opened this issue · 2 comments
nkta3m commented
静态编译后的文件还是比较大的,是否可以使用 strip 和 upx 进行压缩?
nkta3m commented
-
需要在Dockerfile中增加upx安装项,
-
然后需要在entrypoint.sh中修改如下行:
if [ $ARCHITECH == "mips64" ]
then
host=mips64-linux-gnuabi64
strip=mips64-linux-gnuabi64-strip
else
host=mipsel-linux-gnu
strip=mipsel-linux-gnu-strip
fi -
还需要在entrypoint.sh中增加如下行:
find $prefix_path/ss-bin ! -name 'ss-nat' -type f | xargs $strip
find $prefix_path/ss-bin ! -name 'ss-nat' -type f | xargs upx
m2nx commented
感谢,方便的话可以提 PR 过来。
…On November 16, 2018 at 10:02:58, Xinge ***@***.***) wrote:
我测试了一下,结果如下:
[image: 2018-11-16 09 36 26]
<https://user-images.githubusercontent.com/13484700/48593101-45c18500-e986-11e8-97d4-9d26969ea11c.png>
[image: 2018-11-16 09 36 36]
<https://user-images.githubusercontent.com/13484700/48593110-5245dd80-e986-11e8-935a-6ae3ea24da5d.png>
1.
需要在Dockerfile中增加upx安装项,
2.
然后需要在entrypoint.sh中修改如下行:
if [ $ARCHITECH == "mips64" ]
then
host=mips64-linux-gnuabi64
strip=mips64-linux-gnuabi64-strip
else
host=mipsel-linux-gnu
strip=mipsel-linux-gnu-strip
fi
3.
还需要在entrypoint.sh中增加如下行:
find $prefix_path/ss-bin ! -name 'ss-nat' -type f | xargs $strip
find $prefix_path/ss-bin ! -name 'ss-nat' -type f | xargs upx
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APfBZl5IfUUch3AGIMKmxIywY_qxcsgMks5uvhzSgaJpZM4YebTM>
.