Deploying Network services in Docker

Source: Internet
Author: User
Tags docker ps

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.