Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit c8bcbc3

Browse files
authored
Merge pull request #10 from openapi-json-schema-tools/feat_adds_docker_publishing
Updates dockerfile
2 parents 4b6a217 + f272f75 commit c8bcbc3

File tree

2 files changed

+16
-43
lines changed

2 files changed

+16
-43
lines changed

Dockerfile

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM maven:3.6.3-jdk-11-openj9
22

3-
ENV GEN_DIR /opt/openapi-generator
3+
ENV GEN_DIR /opt/openapi-json-schema-generator
44
WORKDIR ${GEN_DIR}
55
VOLUME ${MAVEN_HOME}/.m2/repository
66

@@ -11,20 +11,20 @@ COPY ./LICENSE ${GEN_DIR}
1111
COPY ./google_checkstyle.xml ${GEN_DIR}
1212

1313
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
14-
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
15-
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
16-
COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-online
17-
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
18-
COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core
19-
COPY ./modules/openapi-generator ${GEN_DIR}/modules/openapi-generator
14+
COPY ./modules/openapi-json-schema-generator-gradle-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-gradle-plugin
15+
COPY ./modules/openapi-json-schema-generator-maven-plugin ${GEN_DIR}/modules/openapi-json-schema-generator-maven-plugin
16+
COPY ./modules/openapi-json-schema-generator-online ${GEN_DIR}/modules/openapi-json-schema-generator-online
17+
COPY ./modules/openapi-json-schema-generator-cli ${GEN_DIR}/modules/openapi-json-schema-generator-cli
18+
COPY ./modules/openapi-json-schema-generator-core ${GEN_DIR}/modules/openapi-json-schema-generator-core
19+
COPY ./modules/openapi-json-schema-generator ${GEN_DIR}/modules/openapi-json-schema-generator
2020
COPY ./pom.xml ${GEN_DIR}
2121

2222
# Pre-compile openapi-generator-cli
23-
RUN mvn -am -pl "modules/openapi-generator-cli" package
23+
RUN mvn -am -pl "modules/openapi-json-schema-generator-cli" package
2424

2525
# This exists at the end of the file to benefit from cached layers when modifying docker-entrypoint.sh.
2626
COPY docker-entrypoint.sh /usr/local/bin/
27-
RUN ln -s /usr/local/bin/docker-entrypoint.sh /usr/local/bin/openapi-generator
27+
RUN ln -s /usr/local/bin/docker-entrypoint.sh /usr/local/bin/openapi-json-schema-generator
2828

2929
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
3030

README.md

+7-34
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ Definitely!
4646
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
4747
- [1.3 - Download JAR](#13---download-jar)
4848
- [1.4 - Build Projects](#14---build-projects)
49-
- [1.5 - Homebrew](#15---homebrew)
50-
- [1.6 - Docker](#16---docker)
51-
- [1.7 - NPM](#17---npm)
49+
- [1.5 - Docker](#15---docker)
5250
- [2 - Getting Started](#2---getting-started)
5351
- [3 - Usage](#3---usage)
5452
- [3.1 - Customization](#31---customization)
@@ -168,12 +166,11 @@ The default build contains minimal static analysis (via CheckStyle). To run your
168166
mvn -Pstatic-analysis clean install
169167
```
170168

171-
### [1.6 - Docker](#table-of-contents)
169+
### [1.5 - Docker](#table-of-contents)
172170

173171
#### Public Pre-built Docker images
174172

175-
- [https://hub.docker.com/r/openapitools/openapi-json-schema-generator-cli/](https://hub.docker.com/r/openapitools/openapi-json-schema-generator-cli/) (official CLI)
176-
- [https://hub.docker.com/r/openapitools/openapi-json-schema-generator-online/](https://hub.docker.com/r/openapitools/openapi-json-schema-generator-online/) (official web service)
173+
- [https://hub.docker.com/r/openapjsonschematools/openapi-json-schema-generator-cli/](https://hub.docker.com/r/openapjsonschematools/openapi-json-schema-generator-cli/) (official CLI)
177174

178175
#### OpenAPI JSON Schema Generator CLI Docker Image
179176

@@ -184,8 +181,8 @@ To generate code with this image, you'll need to mount a local location as a vol
184181
Example:
185182

186183
```sh
187-
docker run --rm -v "${PWD}:/local" openapitools/openapi-json-schema-generator-cli generate \
188-
-i https://raw.githubusercontent.com/openapitools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
184+
docker run --rm -v "${PWD}:/local" openapjsonschematools/openapi-json-schema-generator-cli generate \
185+
-i https://raw.githubusercontent.com/openapjsonschematools/openapi-json-schema-generator/master/modules/openapi-json-schema-generator/src/test/resources/3_0/petstore.yaml \
189186
-g python \
190187
-o /local/out/python
191188
```
@@ -233,7 +230,7 @@ in the docker container. It also maps `~/.m2/repository` to the appropriate cont
233230
To execute `mvn package`:
234231

235232
```sh
236-
git clone https://github.com/openapitools/openapi-json-schema-generator
233+
git clone https://github.com/openapi-json-schema-tools/openapi-json-schema-generator
237234
cd openapi-json-schema-generator
238235
./run-in-docker.sh mvn package
239236
```
@@ -267,38 +264,14 @@ Right now: no solution for this one :|
267264
#### Run Docker in Vagrant
268265
Prerequisite: install [Vagrant](https://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
269266
```sh
270-
git clone https://github.com/openapitools/openapi-json-schema-generator.git
267+
git clone https://github.com/openapi-json-schema-tools/openapi-json-schema-generator.git
271268
cd openapi-json-schema-generator
272269
vagrant up
273270
vagrant ssh
274271
cd /vagrant
275272
./run-in-docker.sh mvn package
276273
```
277274

278-
### [1.7 - NPM](#table-of-contents)
279-
280-
There is also an [NPM package wrapper](https://www.npmjs.com/package/@openapitools/openapi-json-schema-generator-cli) available for different platforms (e.g. Linux, Mac, Windows). (JVM is still required)
281-
Please see the [project's README](https://github.com/openapitools/openapi-json-schema-generator-cli) there for more information.
282-
283-
Install it globally to get the CLI available on the command line:
284-
285-
```sh
286-
npm install @openapitools/openapi-json-schema-generator-cli -g
287-
openapi-json-schema-generator-cli version
288-
```
289-
290-
<!-- RELEASE_VERSION -->
291-
To use a specific version of "openapi-json-schema-generator-cli"
292-
293-
```sh
294-
openapi-json-schema-generator-cli version-manager set 6.1.0
295-
```
296-
297-
Or install it as dev-dependency:
298-
299-
```sh
300-
npm install @openapitools/openapi-json-schema-generator-cli -D
301-
```
302275
<!-- /RELEASE_VERSION -->
303276
## [2 - Getting Started](#table-of-contents)
304277

0 commit comments

Comments
 (0)