Browse Source

docker-compose 镜像制作脚步

pull/2345/head
zhangdaiscott 4 years ago
parent
commit
17019e6261
  1. 8
      jeecg-boot/jeecg-cloud-module/docker-compose.yml
  2. 15
      jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/Dockerfile
  3. 16
      jeecg-boot/jeecg-cloud-module/jeecg-cloud-xxljob/Dockerfile
  4. 24
      jeecg-boot/jeecg-cloud-module/jeecg-cloud-xxljob/pom.xml

8
jeecg-boot/jeecg-cloud-module/docker-compose.yml

@ -67,4 +67,10 @@ services:
environment:
- TZ=Asia/Shanghai
jeecg-boot-xxljob:
build:
context: ./jeecg-cloud-xxljob
ports:
- 9080:9080
container_name: jeecg-boot-xxljob
hostname: jeecg-boot-xxljob

15
jeecg-boot/jeecg-cloud-module/jeecg-cloud-gateway/Dockerfile

@ -0,0 +1,15 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER jeecgos@163.com
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir -p /jeecg-cloud-gateway
WORKDIR /jeecg-cloud-gateway
EXPOSE 9999
ADD ./target/jeecg-cloud-gateway-2.4.2.jar ./
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-2.4.2.jar

16
jeecg-boot/jeecg-cloud-module/jeecg-cloud-xxljob/Dockerfile

@ -0,0 +1,16 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER jeecgos@163.com
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir -p /jeecg-cloud-xxljob
WORKDIR /jeecg-cloud-xxljob
EXPOSE 9080
ADD ./target/jeecg-cloud-xxljob-2.4.2.jar ./
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-xxljob-2.4.2.jar

24
jeecg-boot/jeecg-cloud-module/jeecg-cloud-xxljob/pom.xml

@ -60,4 +60,28 @@
<version>${xxl-job-core.version}</version>
</dependency>
</dependencies>
<!-- update-begin-author:taoyan date:20210226 for:docker部署报错:no main manifest attribute -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
<mainClass>com.xxl.job.admin.XxlJobAdminApplication</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<!-- update-end-author:taoyan date:20210226 for:docker部署报错:no main manifest attribute -->
</project>
Loading…
Cancel
Save