docker-compose 镜像制作脚步

pull/2345/head
zhangdaiscott 2021-03-01 10:31:54 +08:00
parent 4a49479985
commit 17019e6261
4 changed files with 62 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>