forked from mj/devopsscripts
增加部署dockerfile
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
FROM harbor.zzmjart.com/library/compile:1.0.0 as builder
|
||||
FROM 172.31.127.251:8083/library/compile:1.0.0 as builder
|
||||
COPY .git .git
|
||||
COPY src src
|
||||
COPY pom.xml .
|
||||
COPY settings.xml .
|
||||
RUN mvn -s ./settings.xml clean package -DskipTests=true
|
||||
RUN mvn clean package -DskipTests=true
|
||||
|
||||
|
||||
FROM harbor.zzmjart.com/library/java17:1.0.0
|
||||
FROM 172.31.127.251:8083/library/java21:1.0.0
|
||||
ARG PROJECTCODE
|
||||
ARG PROJECTVERSION
|
||||
LABEL author=wangchuan<wangzefu520@163.com>
|
||||
@@ -18,7 +17,20 @@ ENV ENV_ACTIVE="prod" \
|
||||
JAVA_OPS="" \
|
||||
APP_OPS="" \
|
||||
SKYWALKING_OPS="" \
|
||||
GC_OPS="-XX:+UseG1GC -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+HeapDumpOnOutOfMemoryError -Xlog:gc*=info:file=$LOGS_HOME/gc.log:time,level,tags:filecount=30,filesize=50M -XX:HeapDumpPath=$LOGS_HOME/app.dump"
|
||||
GC_OPS="-Xms512m -Xmx512m \
|
||||
-XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m \
|
||||
-XX:+UseG1GC \
|
||||
-XX:MaxGCPauseMillis=200 \
|
||||
-XX:MaxDirectMemorySize=256m \
|
||||
-XX:+UseContainerSupport \
|
||||
-XX:+UseStringDeduplication \
|
||||
-XX:+OptimizeStringConcat \
|
||||
-Djava.security.egd=file:/dev/./urandom \
|
||||
-Dspring.backgroundpreinitializer.ignore=true \
|
||||
-Duser.timezone=GMT+08 \
|
||||
-XX:+HeapDumpOnOutOfMemoryError \
|
||||
-Xlog:gc*=info:file=$LOGS_HOME/gc.log:time,level,tags:filecount=30,filesize=50M \
|
||||
-XX:HeapDumpPath=$LOGS_HOME/app.dump"
|
||||
RUN addgroup -g 1000 1000 && \
|
||||
adduser -u 1000 -G 1000 -S -D -H 1000 && \
|
||||
chown 1000:1000 -R $APP_HOME $LOGS_HOME && \
|
||||
|
||||
Reference in New Issue
Block a user