|
2136 | 2136 | </build> |
2137 | 2137 | </profile> |
2138 | 2138 |
|
| 2139 | + <!-- docker --> |
| 2140 | + <profile> |
| 2141 | + <id>docker.jar</id> |
| 2142 | + <activation> |
| 2143 | + <file> |
| 2144 | + <exists>${basedir}${file.separator}src${file.separator}etc${file.separator}docker.activator</exists> |
| 2145 | + </file> |
| 2146 | + </activation> |
| 2147 | + <properties> |
| 2148 | + <docker.expose>8080</docker.expose> |
| 2149 | + <docker.targetPath>/</docker.targetPath> |
| 2150 | + <docker.directory>${project.build.directory}</docker.directory> |
| 2151 | + <docker.include>${project.build.finalName}.jar</docker.include> |
| 2152 | + </properties> |
| 2153 | + <build> |
| 2154 | + <plugins> |
| 2155 | + <plugin> |
| 2156 | + <groupId>com.spotify</groupId> |
| 2157 | + <artifactId>docker-maven-plugin</artifactId> |
| 2158 | + <version>${docker-maven-plugin.version}</version> |
| 2159 | + <configuration> |
| 2160 | + <imageName>${project.artifactId}</imageName> |
| 2161 | + <baseImage>openjdk:jre-alpine</baseImage> |
| 2162 | + <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint> |
| 2163 | + <exposes> |
| 2164 | + <expose>${docker.expose}</expose> |
| 2165 | + </exposes> |
| 2166 | + <resources> |
| 2167 | + <resource> |
| 2168 | + <targetPath>${docker.targetPath}</targetPath> |
| 2169 | + <directory>${docker.directory}</directory> |
| 2170 | + <include>${docker.include}</include> |
| 2171 | + </resource> |
| 2172 | + </resources> |
| 2173 | + </configuration> |
| 2174 | + </plugin> |
| 2175 | + </plugins> |
| 2176 | + </build> |
| 2177 | + </profile> |
| 2178 | + |
| 2179 | + <profile> |
| 2180 | + <id>docker.stork</id> |
| 2181 | + <activation> |
| 2182 | + <file> |
| 2183 | + <exists>${basedir}${file.separator}src${file.separator}etc${file.separator}docker.stork.activator</exists> |
| 2184 | + </file> |
| 2185 | + </activation> |
| 2186 | + <properties> |
| 2187 | + <docker.expose>8080</docker.expose> |
| 2188 | + <docker.targetPath>./</docker.targetPath> |
| 2189 | + <docker.workdir>/opt/${project.artifactId}</docker.workdir> |
| 2190 | + <docker.directory>${project.build.directory}</docker.directory> |
| 2191 | + <docker.include>${project.build.finalName}.stork.zip</docker.include> |
| 2192 | + </properties> |
| 2193 | + <build> |
| 2194 | + <plugins> |
| 2195 | + <plugin> |
| 2196 | + <groupId>com.spotify</groupId> |
| 2197 | + <artifactId>docker-maven-plugin</artifactId> |
| 2198 | + <version>${docker-maven-plugin.version}</version> |
| 2199 | + <configuration> |
| 2200 | + <imageName>${project.artifactId}</imageName> |
| 2201 | + <baseImage>openjdk:jre-alpine</baseImage> |
| 2202 | + <entryPoint>["bin/${project.artifactId}", "--run"]</entryPoint> |
| 2203 | + <workdir>${docker.workdir}</workdir> |
| 2204 | + <exposes> |
| 2205 | + <expose>${docker.expose}</expose> |
| 2206 | + </exposes> |
| 2207 | + <runs> |
| 2208 | + <run>unzip ${project.build.finalName}.stork.zip</run> |
| 2209 | + </runs> |
| 2210 | + <resources> |
| 2211 | + <resource> |
| 2212 | + <targetPath>${docker.targetPath}</targetPath> |
| 2213 | + <directory>${docker.directory}</directory> |
| 2214 | + <include>${docker.include}</include> |
| 2215 | + </resource> |
| 2216 | + </resources> |
| 2217 | + </configuration> |
| 2218 | + </plugin> |
| 2219 | + </plugins> |
| 2220 | + </build> |
| 2221 | + </profile> |
| 2222 | + |
2139 | 2223 | <!-- checkstyle --> |
2140 | 2224 | <profile> |
2141 | 2225 | <id>checkstyle</id> |
@@ -2666,6 +2750,7 @@ org.eclipse.jdt.apt.processorOptions/defaultOverwrite=true |
2666 | 2750 | <build-helper-maven-plugin.version>1.9.1</build-helper-maven-plugin.version> |
2667 | 2751 | <fizzed-stork-maven-plugin.version>1.2.3</fizzed-stork-maven-plugin.version> |
2668 | 2752 | <capsule-maven-plugin.version>1.0.4</capsule-maven-plugin.version> |
| 2753 | + <docker-maven-plugin.version>0.4.13</docker-maven-plugin.version> |
2669 | 2754 |
|
2670 | 2755 | <jooby.version>${project.version}</jooby.version> |
2671 | 2756 | <jooby-maven-plugin.version>${jooby.version}</jooby-maven-plugin.version> |
|
0 commit comments