You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/08/01 06:57:25 UTC
[shardingsphere-elasticjob] branch master updated: add docker
profile (#1313)
This is an automated email from the ASF dual-hosted git repository.
zhangyonglun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git
The following commit(s) were added to refs/heads/master by this push:
new d9009d1 add docker profile (#1313)
d9009d1 is described below
commit d9009d137e39b961961361ec29f09cee95f86c07
Author: Zhang Yonglun <zh...@apache.org>
AuthorDate: Sat Aug 1 14:57:17 2020 +0800
add docker profile (#1313)
---
.../Dockerfile | 27 ++++++++++++++++++++++
.../pom.xml | 26 +++++++++++++++++++++
2 files changed, 53 insertions(+)
diff --git a/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/Dockerfile b/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/Dockerfile
new file mode 100644
index 0000000..c6ac3cc
--- /dev/null
+++ b/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/Dockerfile
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM java:8
+MAINTAINER ShardingSphere "dev@shardingsphere.apache.org"
+
+ARG APP_NAME
+ENV LOCAL_PATH /opt/shardingsphere-elasticjob-cloud-scheduler
+
+ADD target/${APP_NAME}.tar.gz /opt
+RUN mv /opt/${APP_NAME} ${LOCAL_PATH}
+
+ENTRYPOINT ${LOCAL_PATH}/bin/start.sh ${PORT} && tail -f ${LOCAL_PATH}/logs/stdout.log
diff --git a/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/pom.xml b/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/pom.xml
index 7af4116..5e7dcf9 100644
--- a/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/pom.xml
+++ b/elasticjob-distribution/elasticjob-cloud-scheduler-distribution/pom.xml
@@ -212,5 +212,31 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>cloud-scheduler-bin</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repository>apache/shardingsphere-elasticjob-cloud-scheduler</repository>
+ <tag>${project.version}</tag>
+ <buildArgs>
+ <APP_NAME>${project.build.finalName}-cloud-scheduler-bin</APP_NAME>
+ </buildArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>