赞
踩
Docker创建、运行微服务镜像
本地环境要求:
Java
1)pom添加docker plugin
<docker.image.prefix>springboot</docker.image.prefix>
<docker.maven.plugin.version> 1.2.2</docker.maven.plugin.version>
</properties>
<!-- Docker maven plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</config
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。