导语:今天发现容器中的zip包在容器内解压是中文文件名和中文内容,但是放到宿主机上解压却是乱码文件名和中文内容。下载到自己电脑上是中文文件名和中文内容。容器内也是支持中文的。容器内如果通过命令unzip -O GBK
去解压是没问题的。
现象如图
最后发现容器内的unzip 是指向busybox的。而宿主机是apt 安装的unzip
下载地址
https://launchpad.net/busybox/+download
wget -c https://launchpad.net/busybox/main/1.34.0/+download/busybox-1.34.0.tar.bz2
tar -xjvf busybox-1.34.0.tar.bz2
cd busybox-1.34.0/
make defconfig && make install
编译成功会在_install/bin下生成一个可执行文件busybox
功能强大
把宿主机的unzip删除并替换成busybox 测试成功
ln -s /bin/busybox /bin/unzip
cd /bin/
./unzip
busybox ls
busybox unzip
用法和安装可参考
https://blog.csdn.net/m0_48958478/article/details/121628631
http://tc.wangchao.net.cn/bbs/detail_1865480.html
http://www.360doc.com/content/12/0914/15/4186481_236087171.shtml