File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change
1
+ FROM maven:3.8.6-openjdk-8 as compile-stage
2
+ ARG compile_workdir=/usr/local/project
3
+ WORKDIR $compile_workdir
4
+ COPY pom.xml $compile_workdir
5
+ COPY src/ $compile_workdir/src/
6
+ RUN ls -afl
7
+ RUN mvn -f $compile_workdir/pom.xml clean package -T 1C -Dmaven.test.skip=true -Dmaven.compile.fork=true
8
+ FROM tomcat:8.5.81-jdk8
9
+ ARG compile_workdir=/usr/local/project
10
+ ARG run_workdir=/usr/local/tomcat
11
+ COPY --from=compile-stage $compile_workdir/target/javaee-demo.war $run_workdir/webapps/javaee-demo.war
12
+ LABEL author="netbuffer" version="1.0"
13
+ WORKDIR $run_workdir
14
+ EXPOSE 8080
Original file line number Diff line number Diff line change 1
1
# javaee-demo
2
+ ![ ] ( https://img.shields.io/static/v1?label=java&message=1.8&color=blue )
2
3
![ ] ( https://img.shields.io/static/v1?label=javaee&message=7.0&color=blue )
3
4
![ ] ( https://img.shields.io/static/v1?label=cors-filter&message=2.9&color=blue )
4
5
![ ] ( https://img.shields.io/static/v1?label=fastjson&message=1.2.78&color=blue )
9
10
10
11
* /TestServlet 测试javaee监听器
11
12
* [ cors-filter跨域设置] ( http://software.dzhuvinov.com/cors-filter-installation.html )
12
- * 通过filter修改http response ` ModifyHttpResponseFilter `
13
+ * 通过filter修改http response ` ModifyHttpResponseFilter `
14
+
15
+ ## Docker Image
16
+ * https://hub.docker.com/r/javawiki/javaee-demo
17
+ * docker build -t javawiki/javaee-demo:1.0.0 . --no-cache
18
+ * docker push javawiki/javaee-demo:1.0.0
19
+ * docker run -it -p 8080:8080 --name javaee-demo -h javaee-demo --rm javawiki/javaee-demo:1.0.0
20
+ * curl http://localhost:8080/javaee-demo/
Original file line number Diff line number Diff line change 14
14
15
15
<properties >
16
16
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
17
- <maven .compiler.source>1.7 </maven .compiler.source>
18
- <maven .compiler.target>1.7 </maven .compiler.target>
17
+ <maven .compiler.source>1.8 </maven .compiler.source>
18
+ <maven .compiler.target>1.8 </maven .compiler.target>
19
19
</properties >
20
20
21
21
<dependencies >
You can’t perform that action at this time.
0 commit comments