diff --git a/db/Dockerfile b/db/Dockerfile
index 1d07ef44e351c42bc645e4e61478a2e069076419..1eaa502d7c058ae2428ed6e8222947663e2695e7 100644
--- a/db/Dockerfile
+++ b/db/Dockerfile
@@ -4,6 +4,6 @@ MAINTAINER lengleng(wangiegie@gmail.com)
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
-COPY ./db/pig.sql /docker-entrypoint-initdb.d
+COPY ./pig.sql /docker-entrypoint-initdb.d
-COPY ./db/pig_config.sql /docker-entrypoint-initdb.d
+COPY ./pig_config.sql /docker-entrypoint-initdb.d
diff --git a/docker-compose.yml b/docker-compose.yml
index 39a99272378cfc7a2dac8c21529a3d9595e5a240..e5fd040b7ba2bea1b203a38b2538071c4975ab11 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,8 +2,7 @@ version: '2'
services:
pig-mysql:
build:
- context: ./
- dockerfile: ./db/Dockerfile
+ context: ./db
environment:
MYSQL_ROOT_PASSWORD: root
restart: always
@@ -22,8 +21,7 @@ services:
pig-register:
build:
- context: ./
- dockerfile: ./pig-register/Dockerfile
+ context: ./pig-register
restart: always
ports:
- 8848:8848
@@ -33,8 +31,7 @@ services:
pig-gateway:
build:
- context: ./
- dockerfile: ./pig-gateway/Dockerfile
+ context: ./pig-gateway
restart: always
ports:
- 9999:9999
@@ -44,8 +41,7 @@ services:
pig-auth:
build:
- context: ./
- dockerfile: ./pig-auth/Dockerfile
+ context: ./pig-auth
restart: always
container_name: pig-auth
hostname: pig-auth
@@ -53,8 +49,7 @@ services:
pig-upms:
build:
- context: ./
- dockerfile: ./pig-upms/pig-upms-biz/Dockerfile
+ context: ./pig-upms/pig-upms-biz
restart: always
container_name: pig-upms
hostname: pig-upms
@@ -62,8 +57,7 @@ services:
pig-monitor:
build:
- context: ./
- dockerfile: ./pig-monitor/Dockerfile
+ context: ./pig-monitor
restart: always
ports:
- 5001:5001
@@ -73,8 +67,7 @@ services:
pig-codegen:
build:
- context: ./
- dockerfile: ./pig-codegen/Dockerfile
+ context: ./pig-codegen
restart: always
container_name: pig-codegen
hostname: pig-codegen
diff --git a/pig-auth/Dockerfile b/pig-auth/Dockerfile
index 27027d27358e5b831b20e1d0f6b9a5a0779bad86..b173b0858be0b7e3f1e80750bc92bde8024adbf8 100755
--- a/pig-auth/Dockerfile
+++ b/pig-auth/Dockerfile
@@ -10,6 +10,6 @@ WORKDIR /pig-auth
EXPOSE 3000
-ADD ./pig-auth/target/pig-auth.jar ./
+ADD ./target/pig-auth.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-auth.jar
diff --git a/pig-auth/pom.xml b/pig-auth/pom.xml
index 6c5f065d4728ae6b296dafc629cffd6f5dec8836..8438fcde29302202f7894c2a917fa6d9c0e044b6 100755
--- a/pig-auth/pom.xml
+++ b/pig-auth/pom.xml
@@ -85,6 +85,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pig-codegen/Dockerfile b/pig-codegen/Dockerfile
index d721382de2e2f7b50f1ba91c57b7a9c16b245035..5ab0cb7834197144d9a40610180bfd28699f96a2 100755
--- a/pig-codegen/Dockerfile
+++ b/pig-codegen/Dockerfile
@@ -10,6 +10,6 @@ WORKDIR /pig-codegen
EXPOSE 5003
-ADD ./pig-codegen/target/pig-codegen.jar ./
+ADD ./target/pig-codegen.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-codegen.jar
diff --git a/pig-codegen/pom.xml b/pig-codegen/pom.xml
index 851f07ee5f861aef36266a183520e30a25124ee4..8ee5bb559fa6a4ae5ef31c4899e1ce66d4f4692b 100755
--- a/pig-codegen/pom.xml
+++ b/pig-codegen/pom.xml
@@ -88,6 +88,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pig-gateway/Dockerfile b/pig-gateway/Dockerfile
index 342a6de059f57ebd24bdfdc9833a768baf24186c..4794a67e0255ef6d7232c5875698536e541c0453 100755
--- a/pig-gateway/Dockerfile
+++ b/pig-gateway/Dockerfile
@@ -10,6 +10,6 @@ WORKDIR /pig-gateway
EXPOSE 9999
-ADD ./pig-gateway/target/pig-gateway.jar ./
+ADD ./target/pig-gateway.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-gateway.jar
diff --git a/pig-gateway/pom.xml b/pig-gateway/pom.xml
index a9a3309cfeb57767c1b18ccedace432d0210997c..832b8357f871ea7a6dc60c85fa8cafb4810b0353 100755
--- a/pig-gateway/pom.xml
+++ b/pig-gateway/pom.xml
@@ -80,6 +80,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pig-monitor/Dockerfile b/pig-monitor/Dockerfile
index 35377516ac9e1576518798ca5d8d1a9a6386201e..29e0634ff30755c27edeb8575503e050af93af2f 100755
--- a/pig-monitor/Dockerfile
+++ b/pig-monitor/Dockerfile
@@ -10,6 +10,6 @@ WORKDIR /pig-monitor
EXPOSE 5001
-ADD ./pig-monitor/target/pig-monitor.jar ./
+ADD ./target/pig-monitor.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-monitor.jar
diff --git a/pig-monitor/pom.xml b/pig-monitor/pom.xml
index c6a8ca60bd392d37c68b2f5f69f9cc7803fe3075..a6e989b2177d9cecedd37d15f5494845b0576631 100755
--- a/pig-monitor/pom.xml
+++ b/pig-monitor/pom.xml
@@ -69,6 +69,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pig-register/Dockerfile b/pig-register/Dockerfile
index 492068b07f64812ff76492938232ad0c3d93ffb7..f3061d05d688aa95035436ee9f9a4843da978a06 100644
--- a/pig-register/Dockerfile
+++ b/pig-register/Dockerfile
@@ -10,8 +10,7 @@ WORKDIR /pig-register
EXPOSE 8848
-ADD ./pig-register/target/pig-register.jar ./
-
+ADD ./target/pig-register.jar ./
CMD sleep 30;java -Djava.security.egd=file:/dev/./urandom -jar pig-register.jar
diff --git a/pig-register/pom.xml b/pig-register/pom.xml
index 7dd7a657f220daab703c3e4d9c223a3ea8a40c97..6e7bddd3279c7561cb5e878b029a2c7188268859 100755
--- a/pig-register/pom.xml
+++ b/pig-register/pom.xml
@@ -70,6 +70,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pig-upms/pig-upms-biz/Dockerfile b/pig-upms/pig-upms-biz/Dockerfile
index 55977753049936c764bb8b9d47aab8ee2e514395..d56e110525ffdd9916c5060de23f7f3b952abf2b 100644
--- a/pig-upms/pig-upms-biz/Dockerfile
+++ b/pig-upms/pig-upms-biz/Dockerfile
@@ -10,6 +10,6 @@ WORKDIR /pigx-upms
EXPOSE 4000
-ADD ./pig-upms/pig-upms-biz/target/pig-upms-biz.jar ./
+ADD ./target/pig-upms-biz.jar ./
CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar pig-upms-biz.jar
diff --git a/pig-upms/pig-upms-biz/pom.xml b/pig-upms/pig-upms-biz/pom.xml
index 2f9989a8a4e5686a1dcfa69e557fd6b7dfb44873..330c845944b0368d568f2d400c36642fd4052d96 100644
--- a/pig-upms/pig-upms-biz/pom.xml
+++ b/pig-upms/pig-upms-biz/pom.xml
@@ -88,6 +88,10 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ io.fabric8
+ docker-maven-plugin
+
diff --git a/pom.xml b/pom.xml
index 7089246df714045fbbc022d57f27b76375bd1a89..51de2cd1f762eb04143c23d26d7ddc7edf1cb4f8 100755
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,12 @@
2.1.0
2.9.2
2.3.6.RELEASE
+ http://172.17.0.111:2375
+ 172.17.0.111
+ library
+ admin
+ Harbor12345
+ 0.32.0
@@ -180,6 +186,29 @@
+
+ io.fabric8
+ docker-maven-plugin
+ ${docker.plugin.version}
+
+ ${docker.host}
+ ${docker.registry}
+
+
+ ${docker.username}
+ ${docker.password}
+
+
+
+
+ ${docker.host}/${docker.namespace}/${project.name}:${project.version}
+
+ ${project.basedir}/Dockerfile
+
+
+
+
+