Part of dockerfile
FROM fanne/jdk_base_v001:1.6 COPY .subversion /root/.subversion RUN mkdir -pv /usr/mtserver/ RUN yum install -y svn RUN locale RUN localedef -i zh_CN -c -f UTF-8 zh_CN.UTF-8 RUN echo "export LC_ALL=zh_CN.UTF-8" >> /etc/profile && source /etc/profile WORKDIR /usr/mtserver/ RUN svn co svn://xxx.xxx.xx.com/mt_all/mt_op mt_op WORKDIR /
Among them, when inheriting the mirror image, docker.io/centos 6 of the official website added a jdk mirror image.
Character set problem occurred while executing build for dockerfile
svn: Can't convert string from 'UTF-8' to native encoding: svn: mt_resource_w/25PP? \230? \155? \180? \230? \150? \176? \230? \151? \165? \229? \191? \151.txt
I didn’t have this problem when I directly executed this svn co command on the host host and the mirror, but I always reported that there was a problem with the character set even when I was in dockerfile.
What is the reason?
Set the locale and add:
ENV LANG zh_CN.UTF-8
ENV LC_CTYPE zh_CN.UTF-8