diff --git a/cli/Dockerfile b/cli/Dockerfile new file mode 100644 index 0000000..3eb9235 --- /dev/null +++ b/cli/Dockerfile @@ -0,0 +1,19 @@ +FROM openjdk:8 AS build + +ARG CLI_VERSION="0.3.0" + +RUN curl -s https://codeload.github.com/apiman/apiman-cli/zip/release/v${CLI_VERSION} -o /tmp/apiman-cli-release-v${CLI_VERSION}.zip && \ + unzip /tmp/apiman-cli-release-v${CLI_VERSION}.zip -d /tmp && \ + mv /tmp/apiman-cli-release-v${CLI_VERSION} /tmp/apiman-cli && \ + chmod +x /tmp/apiman-cli/gradlew + +WORKDIR /tmp/apiman-cli +RUN ./gradlew shadowJar + + +FROM openjdk:8-jre-alpine + +RUN mkdir -p /opt/apiman-cli/lib +COPY --from=build /tmp/apiman-cli/build/libs/* /opt/apiman-cli/lib/ + +ENTRYPOINT [ "java", "-jar", "/opt/apiman-cli/lib/apiman-cli.jar" ] diff --git a/cli/README.md b/cli/README.md new file mode 100644 index 0000000..d27b934 --- /dev/null +++ b/cli/README.md @@ -0,0 +1,18 @@ +apiman cli +========== + +## Usage + +To use apiman CLI + + docker run -it apiman/cli [args] + +For valid arguments, please see the documentation for [apiman CLI](https://github.com/apiman/apiman-cli) + +## Building the image + + docker build -t="apiman/cli" --rm . + +## Image accessible on Docker hub + +This image is automatically built and published into [Docker Hub](https://registry.hub.docker.com/u/apiman/cli/).