构建自己的centos

参考:https://blog.51cto.com/wangxiaoke/2437063

参考:https://blog.csdn.net/TheKingOfNight/article/details/86532789

参考:https://www.cnblogs.com/wajika/p/6592659.html

还未经过测试,有坑…

[root@node1 custom-centos]# cat Dockerfile

FROM centos:7
MAINTAINER wangmazi
MAINTAINER [email protected]
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime  \
    && sed -i 13d /etc/yum.conf  \
    && curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo  \
    && curl -o /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo \
    && yum install -y --nogpgcheck glibc-common  \
    && rm -rf /var/cache/yum/* \
    && echo LANG="zh_CN.utf8" > /etc/locale.conf \
    && echo LANG="zh_CN.utf8" >> /etc/profile