Skip to content

Commit b6ebc06

Browse files
committed
build two docker images with root and codegenuser images
1 parent 397d86d commit b6ebc06

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM openjdk:8-jre-alpine
2+
3+
WORKDIR /jetty_home
4+
COPY docker/jetty /jetty_home/
5+
COPY target/lib/jetty* /jetty_home/lib/
6+
RUN rm /jetty_home/lib/jetty-runner*
7+
COPY target/lib/javax.servlet-api* /jetty_home/lib/servlet-api-3.1.jar
8+
COPY target/lib/start.jar /jetty_home/
9+
ENV JETTY_HOME /jetty_home
10+
WORKDIR /generator
11+
COPY docker/jetty_base /generator/
12+
COPY docker/ROOT.xml /generator/webapps/ROOT.xml
13+
COPY target/*.war /generator/webapps/ROOT.war
14+
COPY grantall.policy /generator/grantall.policy
15+
ENV JETTY_BASE /generator
16+
ARG HIDDEN_OPTIONS_DEFAULT_PATH
17+
COPY ${HIDDEN_OPTIONS_DEFAULT_PATH} /generator/resources/
18+
ARG HTTP_PORT
19+
ENV HTTP_PORT ${HTTP_PORT}
20+
ARG JAVA_MEM
21+
ENV JAVA_MEM ${JAVA_MEM}
22+
WORKDIR $JETTY_BASE
23+
CMD ["./start"]

modules/swagger-generator/pom.xml

+37-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
<plugin>
267267
<groupId>com.spotify</groupId>
268268
<artifactId>dockerfile-maven-plugin</artifactId>
269-
<version>1.4.3</version>
269+
<version>1.4.13</version>
270270
<executions>
271271
<execution>
272272
<id>build</id>
@@ -283,6 +283,22 @@
283283
</buildArgs>
284284
</configuration>
285285
</execution>
286+
<execution>
287+
<id>build-root</id>
288+
<goals>
289+
<goal>build</goal>
290+
</goals>
291+
<configuration>
292+
<repository>swaggerapi/swagger-generator-v3-root</repository>
293+
<tag>${docker-latest-tag}</tag>
294+
<buildArgs>
295+
<HIDDEN_OPTIONS_DEFAULT_PATH>${HIDDEN_OPTIONS_DEFAULT_PATH}</HIDDEN_OPTIONS_DEFAULT_PATH>
296+
<JAVA_MEM>${JAVA_MEM}</JAVA_MEM>
297+
<HTTP_PORT>${HTTP_PORT}</HTTP_PORT>
298+
</buildArgs>
299+
<dockerfile>Dockerfile_root</dockerfile>
300+
</configuration>
301+
</execution>
286302
<execution>
287303
<id>tag</id>
288304
<goals>
@@ -293,6 +309,16 @@
293309
<tag>${project.version}</tag>
294310
</configuration>
295311
</execution>
312+
<execution>
313+
<id>tag-root</id>
314+
<goals>
315+
<goal>tag</goal>
316+
</goals>
317+
<configuration>
318+
<repository>swaggerapi/swagger-generator-v3-root</repository>
319+
<tag>${project.version}</tag>
320+
</configuration>
321+
</execution>
296322
<execution>
297323
<id>push</id>
298324
<goals>
@@ -303,6 +329,16 @@
303329
<tag>${docker-latest-tag}</tag>
304330
</configuration>
305331
</execution>
332+
<execution>
333+
<id>push-root</id>
334+
<goals>
335+
<goal>push</goal>
336+
</goals>
337+
<configuration>
338+
<repository>swaggerapi/swagger-generator-v3-root</repository>
339+
<tag>${docker-latest-tag}</tag>
340+
</configuration>
341+
</execution>
306342
</executions>
307343
</plugin>
308344
</plugins>

0 commit comments

Comments
 (0)