未验证 提交 2180bc5a 编写于 作者: A avalon5666 提交者: GitHub

Enhancement scaling docker build & Add ui docker build (#5662)

Co-authored-by: Navalon566 <avalon566@163.com>
上级 8ef6c680
...@@ -18,14 +18,11 @@ ...@@ -18,14 +18,11 @@
FROM java:8 FROM java:8
MAINTAINER ShardingSphere "dev@shardingsphere.apache.org" MAINTAINER ShardingSphere "dev@shardingsphere.apache.org"
ENV CURRENT_VERSION 4.1.1 ARG APP_NAME
ENV APP_NAME apache-shardingsphere
ENV MODULE_NAME sharding-scaling
ENV LOCAL_PATH /opt/sharding-scaling ENV LOCAL_PATH /opt/sharding-scaling
RUN wget https://dist.apache.org/repos/dist/release/shardingsphere/${CURRENT_VERSION}/${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz && \ ADD target/${APP_NAME}.tar.gz /opt
tar -xzvf ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz && \ RUN mv /opt/${APP_NAME} ${LOCAL_PATH}
mv ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin ${LOCAL_PATH} && \ RUN mkdir -p ${LOCAL_PATH}/ext-lib
rm -f ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz
ENTRYPOINT ${LOCAL_PATH}/bin/start.sh ${PORT} && tail -f ${LOCAL_PATH}/logs/stdout.log ENTRYPOINT ${LOCAL_PATH}/bin/start.sh ${PORT} && tail -f ${LOCAL_PATH}/logs/stdout.log
...@@ -77,5 +77,31 @@ ...@@ -77,5 +77,31 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<executions>
<execution>
<id>sharding-scaling-bin</id>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<repository>apache/sharding-scaling</repository>
<tag>${project.version}</tag>
<buildArgs>
<APP_NAME>${project.build.finalName}-sharding-scaling-bin</APP_NAME>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>
...@@ -18,14 +18,10 @@ ...@@ -18,14 +18,10 @@
FROM java:8 FROM java:8
MAINTAINER ShardingSphere "dev@shardingsphere.apache.org" MAINTAINER ShardingSphere "dev@shardingsphere.apache.org"
ENV CURRENT_VERSION 4.1.1 ARG APP_NAME
ENV APP_NAME apache-shardingsphere
ENV MODULE_NAME shardingsphere-ui
ENV LOCAL_PATH /opt/shardingsphere-ui ENV LOCAL_PATH /opt/shardingsphere-ui
RUN wget https://dist.apache.org/repos/dist/release/shardingsphere/shardingsphere-ui-${CURRENT_VERSION}/${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz && \ ADD target/${APP_NAME}.tar.gz /opt
tar -xzvf ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz && \ RUN mv /opt/${APP_NAME} ${LOCAL_PATH}
mv ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin ${LOCAL_PATH} && \
rm -f ${APP_NAME}-${CURRENT_VERSION}-${MODULE_NAME}-bin.tar.gz
ENTRYPOINT ${LOCAL_PATH}/bin/start.sh ${PORT} && tail -f ${LOCAL_PATH}/logs/stdout.log ENTRYPOINT ${LOCAL_PATH}/bin/start.sh ${PORT} && tail -f ${LOCAL_PATH}/logs/stdout.log
...@@ -85,5 +85,31 @@ ...@@ -85,5 +85,31 @@
</plugins> </plugins>
</build> </build>
</profile> </profile>
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<executions>
<execution>
<id>shardingsphere-ui-bin</id>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<repository>apache/shardingsphere-ui</repository>
<tag>${project.version}</tag>
<buildArgs>
<APP_NAME>${project.build.finalName}-shardingsphere-ui-bin</APP_NAME>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
</project> </project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册