微服务docker镜像制作

pull/3958/head
zhangdaiscott 2022-07-21 11:26:50 +08:00
parent a2b8777d3d
commit 80e26d2b94
3 changed files with 36 additions and 1 deletions

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-demo
WORKDIR /jeecg-cloud-demo
EXPOSE 7002
ADD ./target/jeecg-boot-module-demo-3.3.0.jar ./
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-boot-module-demo-3.3.0.jar

View File

@ -21,7 +21,16 @@
<profiles>
<profile>
<id>SpringCloud</id>
<!-- 引入微服务启动 Starter依赖 -->
<!-- 引入springboot独立启动-->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<!-- 引入微服务Starter依赖 -->
<dependencies>
<dependency>
<groupId>org.jeecgframework.boot</groupId>

View File

@ -20,6 +20,17 @@ services:
environment:
- TZ=Asia/Shanghai
jeecg-boot-demo:
depends_on:
- jeecg-boot-nacos
build:
context: ../jeecg-boot-module-demo
container_name: jeecg-boot-demo
hostname: jeecg-boot-demo
restart: on-failure
environment:
- TZ=Asia/Shanghai
jeecg-boot-gateway:
restart: on-failure
build: