Before trying to play Docker for a while, today is the first time to formally deploy network services in Docker.
Originally want and lxc similar things that nature is extremely easy, didn't think or changed a lot.
The first problem encountered was that the remote connected to the Docker host was suddenly disconnected from the network. A silly drop, used to be even the intranet, has never been. This time even a reverse tunnel, incredibly broken, dumbfounded.
Even go back, found Docker PS still have process, good, Docker attach this process, and went in again.
If no process is found, just save the Docker commit, and then Docker run pulls up to continue
If you also forget the ID number, you can also Docker ps-a look at the most recently used containers.
The second problem is that the deployment of tornado after the service found cannot bind address, think about it, guess is the container command too little can not automatically determine the IP address, manually assigned a, but the problem came again, how to put the internal port and external ports to get through it?
There are several ways to
The first is to talk about Docker's network non-container flowers,--net=host the network into the same environment as the host
The second is that Docker run-p outerip:outerport:innerport the external IP, port to the internal port, and of course, you can map the external directory to the internal directory with-V
Deploying Network services in Docker