Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker-docker-appium Image of "docker practical stories" python (30)

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The original article is welcome to reprint. Reprint please indicate: reproduced from IT Story Association, thank you!

> > original link address: docker-docker-appium image of "docker practical stories" python (30)

The basic commands of docekr were commonly used last time, and an old man asked me, how can the containers inside docker be accessed by the Internet?

How to make the Internet access to docker

(1) first, let docker host be deployed on the public network.

For example, if you buy a CVM on Aliyun, Aliyun will assign you two addresses: a public IP address and a private network IP address. The public IP address actually has the IP address of the public network, and this IP address can be routed on the Internet. Computers at home can also access the Internet, ah, why our services can not be accessed by others, certainly can not be accessed in the private network.

IPV4 and IPV6

IPV4,IPV6 is currently being used and is still being promoted. Ipv4 is limited. Not everyone can have an ip address. You can't surf the Internet without an ip address. How is this problem solved? This involves some knowledge of the network.

NAT technology

You can assign a public ip address to an enterprise and plan a private network address within the enterprise. For example, if the computer at home is connected to the router, the ip address configured by the router is the private ip address. How to configure the internal network is unregulated and self-managed, but the exit must be an assigned ip address. The public ip address assigned by the service provider. It involves a technology NAT technology, network address nat address, which can ensure that the internal private network of the enterprise can access the Internet, and the servers of the internal private network of the enterprise can provide external services. In this way, devices in the private network can be accessed by the Internet.

How to set up Port Mapping in docker

> start the virtual machine.

Su-# password vagrantservice docker restart# background starts a container httpd, container internal port 80, mapping to external is 80docker run-d-p 80:80 httpd

Install appium in docker

> if it is very complicated to install appium in docker alone, we can simply download the image where appium is installed.

Take a look at the online tutorials to see how complicated it is not to use docker mirrors. Reference website: https://oxygenengine.github.io/%E6%8A%80%E6%9C%AF/2017/10/18/install-auto-test-environment-on-centos-7/ takes 10 steps

Docker way to install appium

The docker search appium# is more than 1 g larger because an accelerator has been set up to download according to its own network speed. Docker pull appium/appium

PS: it takes a long time to download. Next time let's take a look at how docker appium connects to the virtual machine under windows.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report