欢迎光临
我们一直在努力

利用docker一键搭建MinDoc

项目地址如下

https://github.com/lifei6671/mindoc

执行下面的语句

<span class="pln">docker run </span><span class="pun">-</span><span class="pln">p </span><span class="lit">8181</span><span class="pun">:</span><span class="lit">8181</span> <span class="pun">--</span><span class="pln">name mindoc </span><span class="pun">-</span><span class="pln">e DB_ADAPTER</span><span class="pun">=</span><span class="pln">mysql </span><span class="pun">-</span><span class="pln">e MYSQL_PORT_3306_TCP_ADDR</span><span class="pun">=</span><span class="lit">127.0</span><span class="pun">.</span><span class="lit">0.1</span> <span class="pun">-</span><span class="pln">e MYSQL_PORT_3306_TCP_PORT</span><span class="pun">=</span><span class="lit">3306</span> <span class="pun">-</span><span class="pln">e MYSQL_INSTANCE_NAME</span><span class="pun">=</span><span class="pln">mindoc </span><span class="pun">-</span><span class="pln">e MYSQL_USERNAME</span><span class="pun">=</span><span class="pln">mindoc </span><span class="pun">-</span><span class="pln">e MYSQL_PASSWORD</span><span class="pun">=</span><span class="pln">password </span><span class="pun">-</span><span class="pln">e httpport</span><span class="pun">=</span><span class="lit">8181</span> <span class="pun">-</span><span class="pln">d harryhan1989</span><span class="pun">/</span><span class="pln">mindoc</span>

上面环境变量解释如下:

<span class="pln">MYSQL_PORT_3306_TCP_ADDR    </span><span class="typ">MySQL</span><span class="pun">地址</span><span class="pln">
MYSQL_PORT_3306_TCP_PORT    </span><span class="typ">MySQL</span><span class="pun">端口号</span><span class="pln">
MYSQL_INSTANCE_NAME         </span><span class="typ">MySQL</span><span class="pun">数据库名称</span><span class="pln">
MYSQL_USERNAME              </span><span class="typ">MySQL</span><span class="pun">账号</span><span class="pln">
MYSQL_PASSWORD              </span><span class="typ">MySQL</span><span class="pun">密码</span><span class="pln">
HTTP_PORT                   </span><span class="pun">程序监听的端口号</span>

提示:
mysql地址如果用127.0.0.1一直提示找不到数据库
最后写外网地址就好了

赞(0)
未经允许不得转载:798VPS » 利用docker一键搭建MinDoc
分享到: 更多 (0)