Sign inSign up

kecikeci/centos7.2-tools

By kecikeci

•Updated over 8 years ago

centos7.2+阿里云yum源+ssh密码登录+常用软件 基于官方centos7.2.1511镜像

Image
6

7.3K

kecikeci/centos7.2-tools repository overview

⁠centos7.2+阿里云yum源+ssh密码登录+常用软件

⁠基于官方centos7.2.1511镜像

⁠ssh初始密码root123,可用passwd命令修改

⁠个人博客:https://4xx.me⁠

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

⁠安装ssh

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

⁠清除yum缓存

RUN yum clean all RUN rm -rf /var/cache/yum/*

EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"]

Tag summary

Content type

Image

Digest

Size

200.3 MB

Last updated

over 8 years ago

docker pull kecikeci/centos7.2-tools