Browse Source

更新配置

dongzhaorui 1 year ago
parent
commit
f10fc84db8
1 changed files with 10 additions and 6 deletions
  1. 10 6
      zbytb/Dockerfile

+ 10 - 6
zbytb/Dockerfile

@@ -7,20 +7,24 @@ RUN echo "alias ll='ls -hall'" >> ~/.bashrc && source ~/.bashrc
 # 配置容器时间
 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
 
-# 设置编码
-RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
-RUN export LANG=zh_CN.UTF-8
-
 # 更新yum源, 并生成缓存
 RUN curl -o /etc/yum.repos.d/CentOS7-Aliyun.repo http://mirrors.aliyun.com/repo/Centos-7.repo && curl -o /etc/yum.repos.d/epel-7-Aliyun.repo http://mirrors.aliyun.com/repo/epel-7.repo
 RUN yum clean all && yum makecache && yum -y update
+RUN yum install -y wget unzip kde-l10n-Chinese
+
+# 设置编码
+RUN export LANG=zh_CN.UTF-8
+# 设置系统语言
+RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
+# 设置vi编码(防止中文乱码)
+RUN grep -qxF 'set encoding=utf8' /etc/virc || echo 'set encoding=utf8' >> /etc/virc
 
 WORKDIR /opt
-# 安装node, 更换npm源 
+# 安装node, 更换npm源
 RUN curl -fsSL https://rpm.nodesource.com/setup_14.x | bash && yum -y install nodejs && npm config set registry https://registry.npm.taobao.org
 
 # 安装 python3.8.10 gcc相关配置
-RUN yum --exclude=kernel* update -y && yum groupinstall -y 'Development Tools' && yum install -y gcc openssl-devel bzip2-devel libffi-devel wget gtk3 libXt kde-l10n-Chinese glibc-common unzip
+RUN yum --exclude=kernel* update -y && yum groupinstall -y 'Development Tools' && yum install -y gcc openssl-devel bzip2-devel libffi-devel gtk3 libXt glibc-common
 # python3.8.10下载与解压缩
 RUN curl -o python3.8.10.tgz https://mirrors.huaweicloud.com/python/3.8.10/Python-3.8.10.tgz && tar -zxvf python3.8.10.tgz
 # 切换工作目录