From dc8d28a256a17526fdaec8bc3e115ac184b9195e Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 20 Oct 2020 19:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/docs/files/10010_快速体验.md | 6 +++--- docker-entrypoint.sh | 2 +- dockerfile | 12 ------------ 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/doc/docs/files/10010_快速体验.md b/doc/docs/files/10010_快速体验.md index 5d1208e8..a28b020e 100644 --- a/doc/docs/files/10010_快速体验.md +++ b/doc/docs/files/10010_快速体验.md @@ -22,13 +22,13 @@ - 安装并启动Nacos,[安装教程](https://nacos.io/zh-cn/docs/quick-start.html) - 执行Mysql脚本`sop.sql`(Mysql版本5.6+),5.6以下运行`sop-mysql5.6以下版本.sql` -- 打开`docker-entrypoint.sh`,修改mysql,nacos地址 +- 打开`docker-entrypoint.sh`,修改mysql,nacos配置 - 执行`docker-build.sh` - 找到sop-test,运行`com.gitee.sop.test.AlipayClientPostTest.testGet`进行接口调用测试 -> admin地址:http://ip:8082/ -> 文档地址:http://ip:8083/ +> - admin地址:http://ip:8082 登录账号:admin/123456 +> - 文档地址:http://ip:8083/ ## 使用admin diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 16ad5969..73b6894c 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -3,7 +3,7 @@ JAVA_OPTS="-Xms128m -Xmx128m" # mysql, nacos配置 -args="--mysql.host=10.1.30.110:3306 --register.url=10.1.30.110:8848" +args="--mysql.host=10.1.30.110:3306 --mysql.username=root --mysql.password=root --register.url=10.1.30.110:8848" java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-gateway/sop-gateway.jar $args --logging.file.path=/sop/sop-gateway/log & java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /sop/sop-admin/sop-admin.jar $args --logging.file.path=/sop/sop-admin/log & diff --git a/dockerfile b/dockerfile index 7ed256b7..3d585900 100644 --- a/dockerfile +++ b/dockerfile @@ -2,18 +2,6 @@ FROM java:8 VOLUME /tmp VOLUME /sop -COPY sop.sql sop.sql - -# 安装mysql -RUN yum install mysql mysql-server -RUN /etc/init.d/mysqld start &&\ -mysql -e "grant all privileges on *.* to 'root'@'%' identified by 'root';" &&\ -mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'root';" -EXPOSE 3306 -CMD ["mysqld_safe"] - -CMD mysql -uroot -proot mysql < sop.sql - # 将所有应用放到一个镜像当中 ADD sop-gateway/target/*.jar sop/sop-gateway/sop-gateway.jar ADD sop-admin/sop-admin-server/target/*.jar sop/sop-admin/sop-admin.jar