"Docker combat chapter" python of docker-docker-appium mirror (30)

>> original article, welcome to reprint. Reproduced please specify: Reprinted from IT people story , thank you!
>> Original link address: "docker combat chapter" python of docker-docker-appium mirror (30)



Basic commands docekr last talked commonly used, there are old iron ask me how to make the inside of the container docker Internet access?

How to make Internet access docker

  • (A) First, let docker host deployed in the public Internet

    For example, you bought on Ali cloud with a cloud host, Ali cloud will give you assign two addresses, one public IP address, IP address, IP address within a network, the IP address of the public actually have public network the IP address can be routed over the Internet. A computer at home can also access ah, why others can not access the service, certainly in the private network access to reach.

  • IPV4 and IPV6

    Currently used are IPV4, IPV6 is still promotion. ipv4 is limited not everyone can have a ip address. No ip address can not be the Internet, the problem is how to solve it? This involves some knowledge of networks.

  • NAT technology

    It can be assigned to a company of a public ip address, internal self planning a private network address. For example, a home computer connected to the router, the router is configured ip address private ip address. How to configure the internal network nobody, self-management, but good export must be assigned ip address. Operator assigned public ip address. Which involves a technology NAT technology, network address nat address, you can ensure that internal private network to access the Internet, and can be internal private network server to provide services. Such devices can be in a private network to access the Internet.

  • How to set up port mapping in Docker
    > to start the virtual machine.

su - 
# password Vagrant 
Service Docker restart 
# background to start a container httpd, internal container port 80, is mapped to an external 80 
Docker RUN httpd -d -p 80:80

  • Appium installed in the docker
    > If installed separately docker in appium very complicated, in fact, we can directly download and install good appium a mirror on it.

Sophisticated look online tutorial you will know not to use docker image is a multi-complex. Reference website: https: //oxygenengine.github.io/%E6%8A%80%E6%9C%AF/2017/10/18/install-auto-test-environment-on-centos-7/ need 10 steps

docker way to install appium

Search appium Docker 
# large more than 1 g, because before the accelerator has been set to download according to their speed. 
docker pull appium / appium

PS: the download process is relatively long, next time we take a look at docker together appium how to connect the virtual machine under windows.


Guess you like

Origin blog.51cto.com/12040702/2416466