This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 24c0cd368c English conversion (#1864)
24c0cd368c is described below

commit 24c0cd368c81fc700b73eb7e1cb6de1335f5ad58
Author: mfordjody <[email protected]>
AuthorDate: Tue Jan 17 14:11:06 2023 +0800

    English conversion (#1864)
---
 .../advanced-features-and-usage/others/docker.md   | 54 +++++++++++-----------
 1 file changed, 26 insertions(+), 28 deletions(-)

diff --git 
a/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/others/docker.md 
b/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/others/docker.md
index ee5d1c4846..1f3ed5e6b2 100644
--- a/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/others/docker.md
+++ b/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/others/docker.md
@@ -6,61 +6,59 @@ weight: 6
 description: ""
 ---
 
-Some deployment scenarios need to dynamically specify the address of service 
registration. For example, docker bridge network mode need to specify a 
registered host IP for external network communication. Dubbo provides two pairs 
of system attributes in the startup phase, which are used to set the IP and 
port addresses of external communication.
-* DUBBO_IP_TO_REGISTRY --- Registering to the IP address of the registration 
center
-* DUBBO_PORT_TO_REGISTRY --- Registering to the port of the registration center
-* DUBBO_IP_TO_BIND --- Listening IP addresses  
-* DUBBO_PORT_TO_BIND --- Listening ports
+一些部署场景需要动态地指定服务注册地址。例如,docker 
bridge网络模式需要为外部网络通信指定一个注册主机IP。Dubbo在启动阶段提供了两对系统属性,用于设置外部通信的IP和端口地址。
+* DUBBO_IP_TO_REGISTRY --- 注册到注册中心的IP地址
+* DUBBO_PORT_TO_REGISTRY --- 注册到注册中心的端口
+* DUBBO_IP_TO_BIND --- 侦听IP地址
+* DUBBO_PORT_TO_BIND --- 侦听端口
 
-> 1. The above four configurations are optional. Dubbo will automatically get 
IP and port if there is no configuration. Please choose them flexibly according 
to deployment scenarios.
-> 2. Dubbo supports multi-protocol. **If an application exposes multiple 
different protocol services simultaneously and need to specify IP or port 
separately for each service. Please add the protocol prefix before the above 
attributes separately.** For example:
-> * HESSIAN_DUBBO_PORT_TO_BIND    hessian protocol bound port
-> * DUBBO_DUBBO_PORT_TO_BIND      dubbo protocol bound port
-> * HESSIAN_DUBBO_IP_TO_REGISTRY  hessian protocol registered IP
-> * DUBBO_DUBBO_IP_TO_REGISTRY      dubbo protocol registered IP
-> 3. `PORT_TO_REGISTRY` or `IP_TO_REGISTRY`won’t be used as default 
`PORT_TO_BIND` or `IP_TO_BIND`,But the reverse is true.
-> * If set`PORT_TO_REGISTRY=20881` `IP_TO_REGISTRY=30.5.97.6`,then 
`PORT_TO_BIND` `IP_TO_BIND`won’t be affected.
-> * If set`PORT_TO_BIND=20881` `IP_TO_BIND=30.5.97.6`,then 
`PORT_TO_REGISTRY=20881` `IP_TO_REGISTRY=30.5.97.6` by default.
->
+> 1. 以上四个配置是可选的。如果没有配置,Dubbo会自动获得IP和端口。请根据部署情况,灵活选择。
+> 2. Dubbo支持多协议. 
**如果一个应用程序同时暴露了多个不同的协议服务,并且需要为每个服务分别指定IP或端口。请在上述属性前分别添加协议前缀。** 
+> * HESSIAN_DUBBO_PORT_TO_BIND    hessian 协议绑定端口
+> * DUBBO_DUBBO_PORT_TO_BIND      dubbo 协议绑定端口
+> * HESSIAN_DUBBO_IP_TO_REGISTRY  hessian 协议注册的IP
+> * DUBBO_DUBBO_IP_TO_REGISTRY      dubbo 协议注册的IP
+> 3. 
`PORT_TO_REGISTRY`或`IP_TO_REGISTRY`不会被用作默认的`PORT_TO_BIND`或`IP_TO_BIND`,但相反的是 
true。
+> * 如果设置`PORT_TO_REGISTRY=20881` `IP_TO_REGISTRY=30.5.97.6`,那么 `PORT_TO_BIND` 
`IP_TO_BIND`不会受到影响。
+> * 如果设置`PORT_TO_BIND=20881` `IP_TO_BIND=30.5.97.6`,那么 
`PORT_TO_REGISTRY=20881` `IP_TO_REGISTRY=30.5.97.6` 默认情况下。
 
-[dubbo-docker-sample](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-docker)
 local operation process:
+[dubbo-docker-sample](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-docker)
 本地操作过程:
 
-1. clone project to local
+1. 克隆项目到本地
 ```sh
 git clone [email protected]:dubbo/dubbo-docker-sample.git
 cd dubbo-docker-sample
 ```
-2. package local maven
+2. 包本地的maven
 ```sh
 mvn clean install
 ```
-3. build a mirror by docker build
+3. 通过docker build建立一个镜像
 ```sh
 docker build --no-cache -t dubbo-docker-sample .
 ```
-Dockerfile
+4. 构建镜像
 ```sh
 FROM openjdk:8-jdk-alpine
 ADD target/dubbo-docker-sample-0.0.1-SNAPSHOT.jar app.jar
 ENV JAVA_OPTS=""
 ENTRYPOINT exec java $JAVA_OPTS -jar /app.jar
 ```
-4. Create and run containers from mirroring
+5. 从镜像中创建和运行容器
 ```sh
-# Since we use the zk registration center, we start zk container first
+# 由于我们使用zk注册中心,我们先启动zk容器
 docker run --name zkserver --restart always -d zookeeper:3.4.9
 ```
 ```sh
 docker run -e DUBBO_IP_TO_REGISTRY=30.5.97.6 -e DUBBO_PORT_TO_REGISTRY=20881 
-p 30.5.97.6:20881:20880 --link zkserver:zkserver -it --rm dubbo-docker-sample
 ```
 
-> Suppose the host IP is 30.5.97.6.
-> set the provider to register the IP address and port of the registration 
center by environment variables `DUBBO_IP_TO_REGISTRY=30.5.97.6` 
`DUBBO_PORT_TO_REGISTRY=20881`    
-> Implement the port mapping by`-p 30.5.97.6:20881:20880`, where 20880 is the 
listening port automatically selected by dubbo. There is no monitoring IP 
configuration, so it will listen 0.0.0.0 (all IP).
-> After startup, the registered address of provider is 30.5.97.6:20881, and 
the listening address of the container is: 0.0.0.0:20880 
+> 假设主机IP是 30.5.97.6.
+> 通过环境变量设置提供商注册的IP地址和注册中心的端口 `DUBBO_IP_TO_REGISTRY=30.5.97.6` 
`DUBBO_PORT_TO_REGISTRY=20881`    
+> 通过以下方式实现端口映射`-p 30.5.97.6:20881:20880`, 
其中20880是由dubbo自动选择的监听端口。没有监控IP的配置,所以它将监听0.0.0.0(所有IP)。
+> 启动后,提供者的注册地址是30.5.97.6:20881,而容器的监听地址是:0.0.0.0:20880。  
 
-5. Test
-Execute from another host or container
+6. 测试从另一个主机或容器中执行
 ```sh
 telnet 30.5.97.6 20881
 ls

Reply via email to