mirror of
https://gitee.com/log4j/pig.git
synced 2024-12-22 20:54:25 +08:00
#I1XCQO 优化docker镜像构建 https://gitee.com/log4j/pig/issues/I1XCQO
This commit is contained in:
parent
3b800f54d4
commit
c4e2bbb8cc
@ -1,17 +1,20 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-auth.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-auth
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-auth
|
||||
|
||||
WORKDIR /pig-auth
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ADD ./target/pig-auth.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-auth.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-gateway.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-gateway
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-gateway
|
||||
|
||||
WORKDIR /pig-gateway
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 9999
|
||||
|
||||
ADD ./target/pig-gateway.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-gateway.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,19 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-register.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-register
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-register
|
||||
|
||||
WORKDIR /pig-register
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 8848
|
||||
|
||||
ADD ./target/pig-register.jar ./
|
||||
|
||||
CMD sleep 30;java $JAVA_OPTS -jar pig-register.jar
|
||||
|
||||
|
||||
CMD sleep 30; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-upms-biz.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-upms
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-upms
|
||||
|
||||
WORKDIR /pig-upms
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
ADD ./target/pig-upms-biz.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-upms-biz.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-codegen.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-codegen
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-codegen
|
||||
|
||||
WORKDIR /pig-codegen
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 5002
|
||||
|
||||
ADD ./target/pig-codegen.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-codegen.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-monitor.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-monitor
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-monitor
|
||||
|
||||
WORKDIR /pig-monitor
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 5001
|
||||
|
||||
ADD ./target/pig-monitor.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-monitor.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-sentinel-dashboard.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-sentinel-dashboard
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-sentinel-dashboard
|
||||
|
||||
WORKDIR /pig-sentinel-dashboard
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 5003
|
||||
|
||||
ADD ./target/pig-sentinel-dashboard.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-sentinel-dashboard.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
@ -1,17 +1,19 @@
|
||||
FROM openjdk:8-jre as builder
|
||||
WORKDIR build
|
||||
ARG JAR_FILE=target/pig-xxl-job-admin.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-xxl-job-admin
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN mkdir -p /pig-xxl-job-admin
|
||||
|
||||
WORKDIR /pig-xxl-job-admin
|
||||
COPY --from=builder build/dependencies/ ./
|
||||
COPY --from=builder build/snapshot-dependencies/ ./
|
||||
COPY --from=builder build/spring-boot-loader/ ./
|
||||
COPY --from=builder build/application/ ./
|
||||
|
||||
EXPOSE 5004
|
||||
|
||||
ADD ./target/pig-xxl-job-admin.jar ./
|
||||
|
||||
CMD sleep 60;java $JAVA_OPTS -jar pig-xxl-job-admin.jar
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
Loading…
Reference in New Issue
Block a user