mirror of https://github.com/jeecgboot/jeecg-boot
微服务docker镜像制作
parent
a2b8777d3d
commit
80e26d2b94
|
@ -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
|
|
@ -21,7 +21,16 @@
|
||||||
<profiles>
|
<profiles>
|
||||||
<profile>
|
<profile>
|
||||||
<id>SpringCloud</id>
|
<id>SpringCloud</id>
|
||||||
<!-- 引入微服务启动 Starter依赖 -->
|
<!-- 引入springboot独立启动-->
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<!-- 引入微服务Starter依赖 -->
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
|
|
|
@ -20,6 +20,17 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- TZ=Asia/Shanghai
|
- 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:
|
jeecg-boot-gateway:
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Reference in New Issue