blob: cecf14403971fc4cb356e0bc2d2d9649e2e99b28 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>ShardingSphere-Proxy on ShardingSphere</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/</link>
<description>Recent content in ShardingSphere-Proxy on ShardingSphere</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<atom:link href="https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Docker 镜像</title>
<link>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/docker/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/docker/</guid>
<description>拉取官方 Docker 镜像 docker pull apache/shardingsphere-proxy 手动构建 Docker 镜像(可选) git clone https://github.com/apache/shardingsphere mvn clean install cd shardingsphere-distribution/shardingsphere-proxy-distribution mvn clean package -Prelease,docker 配置 ShardingSphere-Proxy 在 /${your_work_dir}/conf/ 创建 server.yaml 和 config-xxx.yaml 文件,进行服务器和分片规则配置。 配置规则,请参考配置手册。 配置模板,请参考配置模板
运行 Docker docker run -d -v /${your_work_dir}/conf:/opt/shardingsphere-proxy/conf -e PORT=3308 -p13308:3308 apache/shardingsphere-proxy:latest 说明
可以自定义端口 3308 和 13308。3308 表示 docker 容器端口, 13308 表示宿主机端口。 必须挂载配置路径到 /opt/shardingsphere-proxy/conf。 docker run -d -v /${your_work_dir}/conf:/opt/shardingsphere-proxy/conf -e JVM_OPTS=&amp;#34;-Djava.awt.headless=true&amp;#34; -e PORT=3308 -p13308:3308 apache/shardingsphere-proxy:latest 说明
可以自定义JVM相关参数到环境变量 JVM_OPTS 中。 docker run -d -v /${your_work_dir}/conf:/opt/shardingsphere-proxy/conf -v /${your_work_dir}/ext-lib:/opt/shardingsphere-proxy/ext-lib -p13308:3308 apache/shardingsphere-proxy:latest 说明</description>
</item>
</channel>
</rss>