# 基于CentOS7.x(7.0+)
sed -i 'SELINUX/s/enforcing/disabled/g' /etc/selinux/config
set enfoce 0
yum install  epel-release  -y
yum install  docker* -y

# start docker service
cat /etc/redhat-release
systemctl start docker.service
docker --help|more
# start docker help
docker --help|more

Install the NTP package:

reference

timedatectl #current time zone.
timedatectl list-timezones #To get the list of all the available time zones
yum install -y ntp #Install the NTP package 
systemctl enable ntpd
systemctl start ntpd
vi /etc/ntp.conf 

Download docker images

docker pull nginx
docker pull centos
cat xxxx.tar |docker import -centos
apt-get update  
#ifconfig  
apt install net-tools        
#ping 
apt install iputils-ping  
#vim
apt install vim
# stop all docker process
docker stop $(docker ps -a -q)
# remove all docker 
docker rm $(docker ps -a -q)

Docker-compose

reference

interactive with runing container.

$ sudo docker exec -it sql1 /bin/bash

copy base os file to running container.

$ sudo docker cp foo.txt sql1:/foo.txt