Commit 621518e84ad75f819f8171f143be3fc7668e81d3
增加dockfile
Showing
3 changed files
with
38 additions
and
5 deletions
DOCKERFILE
0 → 100644
| 1 | +FROM ubuntu:19.10 | |
| 2 | + | |
| 3 | +EXPOSE 18080/tcp | |
| 4 | +EXPOSE 5060/tcp | |
| 5 | + | |
| 6 | +# 使用了自己的settings.xml作为maven的源,加快打包速度 | |
| 7 | +RUN apt-get update && \ | |
| 8 | + apt-get install -y --no-install-recommends openjdk-11-jre git maven nodejs npm && \ | |
| 9 | + cd /home && \ | |
| 10 | + git clone https://github.com/648540858/wiki.git && \ | |
| 11 | + cp wiki/config/settings.xml /usr/share/maven/conf/ && \ | |
| 12 | + git clone https://github.com/648540858/wvp-GB28181.git && \ | |
| 13 | + cd /home/wvp-GB28181/web_src && \ | |
| 14 | + npm install npm -g && \ | |
| 15 | + npm install nrm -g && \ | |
| 16 | + nrm use taobao && \ | |
| 17 | + npm install && \ | |
| 18 | + npm run build && \ | |
| 19 | + mkdir -p /opt/wvp/config && \ | |
| 20 | + cd /home/wvp-GB28181 && \ | |
| 21 | + mvn compile && \ | |
| 22 | + mvn package && \ | |
| 23 | + cp /home/wvp-GB28181/target/wvp-1.5.10.RELEASE.jar /opt/wvp/ && \ | |
| 24 | + rm -rf /home/wiki && \ | |
| 25 | + rm -rf /home/wvp-GB28181 && \ | |
| 26 | + apt-get autoremove -y git maven nodejs npm && \ | |
| 27 | + apt-get clean -y && \ | |
| 28 | + rm -rf /var/lib/apt/lists/*dic | |
| 29 | + | |
| 30 | +WORKDIR /opt/wvp | |
| 31 | + | |
| 32 | +CMD java -jar wvp-1.5.10.RELEASE.jar --spring.config.location=/opt/wvp/config/application.yml | |
| 0 | 33 | \ No newline at end of file | ... | ... |
README.md
pom.xml
| ... | ... | @@ -163,7 +163,6 @@ |
| 163 | 163 | |
| 164 | 164 | <build> |
| 165 | 165 | <plugins> |
| 166 | - | |
| 167 | 166 | <plugin> |
| 168 | 167 | <groupId>org.springframework.boot</groupId> |
| 169 | 168 | <artifactId>spring-boot-maven-plugin</artifactId> |
| ... | ... | @@ -177,7 +176,8 @@ |
| 177 | 176 | <configuration> |
| 178 | 177 | <source>1.8</source> |
| 179 | 178 | <target>1.8</target> |
| 180 | - <!-- <webResources> | |
| 179 | +<<<<<<< HEAD | |
| 180 | + <webResources> | |
| 181 | 181 | <resource> |
| 182 | 182 | <directory>${project.basedir}/libs</directory> |
| 183 | 183 | <targetPath>WEB-INF/lib</targetPath> |
| ... | ... | @@ -186,7 +186,9 @@ |
| 186 | 186 | <include>**/*.jar</include> |
| 187 | 187 | </includes> |
| 188 | 188 | </resource> |
| 189 | - </webResources> --> | |
| 189 | + </webResources> | |
| 190 | +======= | |
| 191 | +>>>>>>> upstream/master | |
| 190 | 192 | </configuration> |
| 191 | 193 | </plugin> |
| 192 | 194 | |
| ... | ... | @@ -194,7 +196,6 @@ |
| 194 | 196 | <groupId>org.apache.maven.plugins</groupId> |
| 195 | 197 | <artifactId>maven-surefire-plugin</artifactId> |
| 196 | 198 | </plugin> |
| 197 | - | |
| 198 | 199 | </plugins> |
| 199 | 200 | </build> |
| 200 | 201 | </project> | ... | ... |