diff --git a/config/application-sonic-agent.yml b/config/application-sonic-agent.yml index b212ef55..c09cfda1 100644 --- a/config/application-sonic-agent.yml +++ b/config/application-sonic-agent.yml @@ -1,6 +1,6 @@ zookeeper: # zookeeper的ip地址,对应server的zookeeper,不能填localhost、127.0.0.1之类的无效ipv4 - registry-host: 127.0.0.1 + registry-host: 192.168.0.2 # zookeeper的端口 registry-port: 2181 # 本机网卡ip地址,不能填localhost、127.0.0.1之类的无效ipv4 diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index d08e0e7e..7d0a047a 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -86,4 +86,4 @@ ADD /plugins /root/plugins ADD /src/main/docker/config /root/config ADD /target/sonic-agent-linux-x86_64.jar /root RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime -ENTRYPOINT ["/root/jdk-15.0.2+7/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-opens java.base/java.lang=ALL-UNNAMED","--add-opens java.base/java.util=ALL-UNNAMED","--add-opens java.base/java.math=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"] +ENTRYPOINT ["/root/jdk-15.0.2+7/bin/java","-server","-Dfile.encoding=utf-8","-XX:-UseGCOverheadLimit","-XX:+DisableExplicitGC","-XX:SurvivorRatio=1","-XX:LargePageSizeInBytes=128M","-XX:SoftRefLRUPolicyMSPerMB=0","-Djava.security.egd=file:/dev/./urandom","--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED","-jar","sonic-agent-linux-x86_64.jar"] diff --git a/src/main/docker/docker-compose.yml b/src/main/docker/docker-compose.yml index 01fc40a3..0bdbe363 100644 --- a/src/main/docker/docker-compose.yml +++ b/src/main/docker/docker-compose.yml @@ -1,8 +1,6 @@ version: '3' services: sonic-agent: - #下方为Docker Hub镜像,推荐海外用户使用,默认使用国内加速镜像 -# image: "sonicorg/sonic-agent-linux:v1.3.2-release" image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.0-beta" environment: - ZOOKEEPER_HOST=192.168.1.1 diff --git a/src/main/docker/docker-compose2.yml b/src/main/docker/docker-compose2.yml new file mode 100644 index 00000000..1d3f2da0 --- /dev/null +++ b/src/main/docker/docker-compose2.yml @@ -0,0 +1,38 @@ +version: '3' +services: + sonic-agent: + image: "sonicorg/sonic-agent-linux:v1.4.0-beta" + environment: + - ZOOKEEPER_HOST=192.168.1.1 + - ZOOKEEPER_PORT=2181 + # 替换为部署Agent机器的ipv4 + - AGENT_HOST=192.168.1.1 + # 替换为Agent服务的端口,可以自行更改 + - AGENT_PORT=7777 + # 替换为前端新增Agent生成的key + - AGENT_KEY=29002272-4659-4808-a804-08ce3388b136 + # 是否使用Sonic机柜,可以前往https://sonic-cloud.gitee.io/#/Cabinet了解更多 + - CABINET_ENABLE=true + - CABINET_STOREY=1 + - CABINET_KEY=e33cd65c-a40e-431f-9e65-4a91bac6f487 + # 是否使用安卓模块 + - ANDROID_ENABLE=true + # 是否开启远程adb调试功能 + - USE_ADBKIT=true + # 是否使用iOS模块 + - IOS_ENABLE=true + # 替换为你自己使用的wda的bundleId,如果没有.xctrunner后缀会自动补全,建议使用公司的开发者证书 + - WDA_BUNDLE_ID=com.facebook.WebDriverAgentRunner.xctrunner + # 是否启用Appium + - APPIUM_ENABLE=true + # 是否启用webview调试功能 + - WEBVIEW_ENABLE=true + # 谷歌调试端口,一般不需要修改(默认0使用随机端口,如果需要开启防火墙给外部使用,请设置固定端口如7778) + - CHROME_DRIVER_PORT=0 + # 是否开启sonic-go-mitmproxy代理功能 + - SGM_ENABLE=true + network_mode: "host" + privileged: true + volumes: + - /dev/bus/usb:/dev/bus/usb + - /var/run/usbmuxd:/var/run/usbmuxd \ No newline at end of file