Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
1d7fa771
Commit
1d7fa771
authored
4 years ago
by
Captain.B
Committed by
刘瑞斌
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 分层构建镜像
parent
4ebcb312
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+15
-7
Dockerfile
with
15 additions
and
7 deletions
+15
-7
Dockerfile
+
15
-
7
View file @
1d7fa771
FROM
openjdk:8-jdk-alpine
as
build
WORKDIR
/workspace/app
COPY
backend/target/backend-1.9.jar .
RUN
mkdir
-p
dependency
&&
(
cd
dependency
;
jar
-xf
../
*
.jar
)
FROM
metersphere/fabric8-java-alpine-openjdk8-jre
MAINTAINER
FIT2CLOUD <support@fit2cloud.com>
ARG
MS_VERSION=dev
ARG
DEPENDENCY=/workspace/app/dependency
RUN
mkdir
-p
/opt/apps
&&
mkdir
-p
/opt/jmeter/lib/junit
COPY
backend/target/backend-1.9.jar /opt
/app
s
COPY
--from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY
--from=build ${DEPENDENCY}/META-INF /app/META-INF
COPY
--from=build ${DEPENDENCY}/BOOT-INF/classes
/app
RUN
mkdir
-p
/opt/jmeter/lib/junit
COPY
backend/target/classes/jmeter/ /opt/jmeter/
ENV
JAVA_
APP_JAR=/opt/apps/backend-1.9.jar
ENV
JAVA_
CLASSPATH=/app:/app/lib/*
ENV
JAVA_MAIN_CLASS=io.metersphere.Application
ENV
AB_OFF=true
ENV
MS_VERSION=${MS_VERSION}
ENV
JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true"
CMD
["/deployments/run-java.sh"]
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help