启动一个centos服务

 root@centos-mysql01:/data# docker run --privileged   -itd --name centos_lnmp1.14 -p 8088:80 -p 33006:3306 centos   /usr/sbin/init
 root@centos-mysql01:/data# docker exec -it 97aaee886614 /bin/bash
 [root@97aaee886614 /]#yum install -y gcc-c++ gcc openssl openssl-devel pcre-devel pcre openssh opsnssh-devel opsnssh-server openssh-* wget curl net-tools make sed
    [root@97aaee886614 /]# sed -i 's@#Port 22@Port 22@' /etc/ssh/sshd_config
我的此处的sshd默认是开启服务的 重新启动是不可以启动的需要手动kill掉sshd服务
[root@97aaee886614 /]# ss -tunlp |awk -F',' '{print $2}'|awk -F"=" '{print $2}'
    [root@97aaee886614 /]# kill -p pid
    root@97aaee886614 /]# systemctl  restart sshd
docker 中 centos /etc/rc.d/init.d/functions: No such file or directory 错误,解决
    [root@97aaee886614 /]#rpm -qf /etc/init.d/functions
    [root@97aaee886614 /]#yum install -y initscripts