File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM maven:3.5-jdk-8-alpine as build
2+ WORKDIR /app
3+ COPY ./ /app
4+ RUN mvn install -q && \
5+ mvn package -q && \
6+ ls /app/target/ && \
7+ MVN_VERSION=$(mvn -q \
8+ -Dexec.executable="echo" \
9+ -Dexec.args='${project.version}' \
10+ --non-recursive \
11+ org.codehaus.mojo:exec-maven-plugin:1.6.0:exec) && \
12+ mv /app/target/openapi-diff-${MVN_VERSION}-jar-with-dependencies.jar /app/openapi-diff.jar
13+
14+ FROM openjdk:8-jre-alpine
15+ WORKDIR /app
16+ COPY --from=0 /app/openapi-diff.jar /app
17+ ENTRYPOINT ["java" , "-jar" , "/app/openapi-diff.jar" ]
18+ CMD ["--help" ]
Original file line number Diff line number Diff line change @@ -274,6 +274,24 @@ try {
274274 Changed response : [200] //successful operation
275275```
276276
277+ # Docker
278+
279+ ## Build image
280+ ``` bash
281+ docker build -t openapi-diff .
282+ ```
283+
284+ ## Run an instance
285+
286+ In this example the ` $(pwd)/src/test/resources ` directory is mounted in the ` /specs ` directory of the container
287+ in readonly mode (` ro ` ).
288+
289+ ``` bash
290+ docker run -t \
291+ -v $( pwd) /src/test/resources:/specs:ro \
292+ openapi-diff /specs/path_1.yaml /specs/path_2.yaml
293+ ```
294+
277295# License
278296openapi-diff is released under the Apache License 2.0.
279297
Original file line number Diff line number Diff line change 216216 <descriptorRef >jar-with-dependencies</descriptorRef >
217217 </descriptorRefs >
218218 </configuration >
219+ <executions >
220+ <execution >
221+ <id >make-assembly</id >
222+ <phase >package</phase >
223+ <goals >
224+ <goal >single</goal >
225+ </goals >
226+ </execution >
227+ </executions >
219228 </plugin >
220229 </plugins >
221230 </build >
You can’t perform that action at this time.
0 commit comments