标签:run net under evel dock ica groupadd dev col
centos7 ssh dockerfile
FROM centos:centos7.7.1908 RUN yum -y install wget RUN rm -rf /etc/yum.repos.d/* RUN cd /etc/yum.repos.d/ \ && wget http://mirrors.aliyun.com/repo/Centos-7.repo && wget http://mirrors.aliyun.com/repo/epel-7.repo RUN yum clean all RUN yum install -y openssh-server bind-utils sysstat telnet net-tools glibc-common gcc automake autoconf libtool make gcc-c++ unzip libaio-devel numactl vim openssh* RUN sed -i ‘s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g‘ /etc/ssh/sshd_config RUN sed -i ‘s/#UseDNS yes/UseDNS no/g‘ /etc/ssh/sshd_config RUN echo ‘123456‘ | passwd --stdin root RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key COPY mysql /usr/local/mysql ADD my.cnf /etc/ RUN mkdir -p /data/mysql/mysql3306/{data,logs,temp} && groupadd mysql && useradd -g mysql -s /sbin/nologin -d /usr/local/mysql -MN mysql && echo "PATH=$PATH:/usr/local/mysql/bin/" >>/etc/profile && chown -R mysql.mysql /data/mysql RUn chown -R mysql.mysql /usr/local/mysql # ------------------------------------------------------------------------------ ADD localtime /etc/localtime RUN mkdir /var/run/sshd EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"]
标签:run net under evel dock ica groupadd dev col
原文地址:https://www.cnblogs.com/fengjian2016/p/12496438.html