centos7基础镜像制作
容器也有时区
centos7.7.1908
#centos7.7.1908 base image
FROM centos:7.7.1908
LABEL mail="timeovers@163.com"
LABEL describe="zh_CN.utf8 TIME YUM"
ENV TIME_ZOME Asia/Shanghai
RUN yum -y install epel-release && yum -y install vim wget net-tools psmisc \
gcc gcc-c++ automake make pcre pcre-devel zlib-devel zlib openssl \
openssl-devel iproute iotop && rm -rf /etc/localtime \
&& ln -sf /usr/share/zoneinfo/${TIME_ZOME} /etc/localtime \
&& yum -y install kde-l10n-Chinese \
&& yum -y reinstall glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 \
&& echo "LANG="zh_CN.utf8"" > /etc/locale.conf \
&& source /etc/locale.conf \
&& yum clean all
ENV LANG=zh_CN.utf8
CMD /usr/sbin/init
centos7.2.1511
#centos7.2.1511 base image
FROM centos:7.2.1511
LABEL mail="timeovers@163.com"
LABEL describe="zh_CN.utf8 TIME YUM"
ENV TIME_ZOME Asia/Shanghai
RUN yum -y install epel-release && yum -y install vim wget net-tools psmisc \
gcc gcc-c++ automake make pcre pcre-devel zlib-devel zlib openssl \
openssl-devel iproute iotop && rm -rf /etc/localtime \
&& ln -sf /usr/share/zoneinfo/${TIME_ZOME} /etc/localtime \
&& yum -y install kde-l10n-Chinese \
&& yum -y reinstall glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 \
&& echo "LANG="zh_CN.utf8"" > /etc/locale.conf \
&& source /etc/locale.conf \
&& yum clean all
ENV LANG=zh_CN.utf8
CMD /usr/sbin/init