Configure PostgreSQL to listen on all interfaces and allow connections from all addresses (to allow Docker connections)
Edit file /etc/postgresql/9.6/main/postgresql.conf, add line listen_addresses = '*' in the "Connection Settings" section
Edit file /etc/postgresql/9.6/main/pg_hba.conf, add line host all all 0.0.0.0/0 md5
Restart PostgreSQL with command sudo systemctl restart postgresql
Import the Docker signing key, add the Docker apt repository, install the Docker engine
wget --quiet -O - https://yum.dockerproject.org/gpg | sudo apt-key add -
sudo add-apt-repository "deb https://apt.dockerproject.org/repo ubuntu-xenial main"
sudo apt-get update #这一步会报错,提示:The method driver /usr/lib/apt/methods/https could not be found.
安装这个即可:apt-get install apt-transport-https
sudo apt-get -y install docker-engine
安装速度非常慢,经常中断。明天去单位换电信的网络试试。