docker run -d -e "container=docker" --net=none --privileged=true -m 1024M --cpu-period=100000 --cpu-quota=200000 -v /sys/fs/cgroup:/sys/fs/cgroup -v /home/data/logs:/home/data/logs -v /opt:/opt --name centos7.1 centos /usr/sbin/init

docker容器的创建
bash dockerin.sh containerID
[root@localhost ~]# cat dockerin.sh
#!/bin/bash
docker_in(){
NAME_ID=$1
PID=$(docker inspect -f "{{ .State.Pid }}" $NAME_ID)
nsenter -t$PID -m -u -i -n -p
}

yum -y install openssh-server openssh-clients