标签:demo spring ref nbsp direct div point project style
# DockerSpringBootPlugin
docker-maven-plugin 完全免Dockerfile 文件
使用docker-maven-plugin 进行完全免 Dockerfile 文件
注意 EXPOSE 在spring boot 中不起作用
Mvnen :
mvn clean package docker:build
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <configuration> <imageName>${docker.image.prefix}/${project.artifactId}.demo</imageName> <!--<dockerDirectory>src/main/docker</dockerDirectory>--> <baseImage>java:8</baseImage> <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin> </plugins> </build>
实例 GitHub https://github.com/atliwen/DockerSpringBootPlugin
docker-maven-plugin 完全免Dockerfile 文件
标签:demo spring ref nbsp direct div point project style
原文地址:http://www.cnblogs.com/atliwen/p/6101946.html