Docker Community Forums

Share and learn in the Docker community.

Centos支持系统中文设置问题

最近开始使用dockerfile制作环境,在进行制作中文环境时,遇到如下问题:

为什么并不是所有菜单栏等是中文呢?而是部分是中文。
我的dockerfile如下:

FROM consol/centos-xfce-vnc:latest
USER root

# zh
RUN yum -y install kde-l10n-Chinese  glibc-common && \
    localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 && \
    cat /dev/null > /etc/locale.conf && echo "LANG=\"zh_CN.UTF-8\"" > /etc/locale.conf && \
    source /etc/locale.conf  && \
    yum clean all  && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV TZ='Asia/Shanghai'  LANG='zh_CN.UTF-8' LANGUAGE='zh_CN:cn' LC_ALL='zh_CN.UTF-8'

#xfce setting
COPY vnc_config /opt/vnc_config
RUN  mkdir -p /headless/.config/xfce4/terminal/ && \
    cp /opt/vnc_config/terminalrc /headless/.config/xfce4/terminal/terminalrc && \
    cp /opt/vnc_config/xsettings.xml /headless/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml && \
    cp /opt/vnc_config/xfce4-panel.xml /headless/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml && \
    cp /opt/vnc_config/terminal.desktop /headless/Desktop/terminal.desktop && \
    chmod 755 /headless/Desktop/*.desktop

如果有很好的解决方法,请告诉我,谢谢。