docker 镜像

This commit is contained in:
wangliwen 2022-06-30 15:58:43 +08:00
parent 22bdb9c4dc
commit 093dc5ba91
2 changed files with 14 additions and 31 deletions

View File

@ -410,42 +410,12 @@
<targetPath>/application</targetPath> <targetPath>/application</targetPath>
<directory>${project.build.directory}</directory> <directory>${project.build.directory}</directory>
<includes> <includes>
<include>${project.artifactId}-${project.version}-fat.jar</include> <include>renren-admin-1.0.tar.gz</include>
</includes> </includes>
</resource> </resource>
</resources> </resources>
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <includeSystemScope>true</includeSystemScope>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-surefire-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <skipTests>true</skipTests>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>com.spotify</groupId>-->
<!-- <artifactId>docker-maven-plugin</artifactId>-->
<!-- <version>${docker.plugin.version}</version>-->
<!-- <configuration>-->
<!-- <imageName>renren/${project.artifactId}</imageName>-->
<!-- <dockerDirectory>${project.basedir}/</dockerDirectory>-->
<!-- <resources>-->
<!-- <resource>-->
<!-- <targetPath>/</targetPath>-->
<!-- <directory>${project.build.directory}</directory>-->
<!-- <include>${project.build.finalName}.jar</include>-->
<!-- </resource>-->
<!-- </resources>-->
<!-- </configuration>-->
<!-- </plugin>-->
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -0,0 +1,13 @@
FROM ibm-semeru-runtimes:open-11-jdk
ENV JAR_FILE renren-admin.jar
ENV TAR_FILE renren-admin-1.0.tar.gz
ENV VERTICLE_HOME /usr/hisense
EXPOSE 8888
VOLUME ["/usr/hisense"]
ADD application/$TAR_FILE $VERTICLE_HOME/
WORKDIR $VERTICLE_HOME/renren-admin
ENTRYPOINT ["sh", "-c"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Duser.timezone=GMT+08 $JAR_FILE"]