centos7.2+阿里云yum源+ssh密码登录+常用软件 基于官方centos7.2.1511镜像
7.3K
FROM hub.c.163.com/library/centos:7.2.1511 MAINTAINER https://4xx.me
RUN cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN yum install wget -y
RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup RUN wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
RUN yum clean all RUN yum install -y yum-plugin-ovl || true RUN yum install -y vim tar wget curl rsync bzip2 iptables tcpdump less telnet net-tools lsof sysstat cronie passwd openssl openssh-server
RUN yum install passwd openssl openssh-server -y RUN ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N '' RUN ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N '' RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N '' RUN sed -i "s/#UsePrivilegeSeparation./UsePrivilegeSeparation no/g" /etc/ssh/sshd_config RUN sed -i "s/UsePAM./UsePAM no/g" /etc/ssh/sshd_config RUN echo "root:root123" | chpasswd
RUN yum clean all RUN rm -rf /var/cache/yum/*
EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"]
Content type
Image
Digest
Size
200.3 MB
Last updated
over 8 years ago
docker pull kecikeci/centos7.2-tools