Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Adds Dockerfile for CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcornish committed Mar 8, 2018
1 parent d6f6bfd commit f571a41
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cli/Dockerfile
@@ -0,0 +1,18 @@
FROM openjdk:8 AS build

ARG CLI_VERSION="0.3.0"

RUN curl -s https://codeload.github.com/apiman/apiman-cli/zip/v${CLI_VERSION} -o /tmp/apiman-cli-${CLI_VERSION}.zip && \
unzip /tmp/apiman-cli-${CLI_VERSION}.zip -d /tmp && \
mv /tmp/apiman-cli-${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" ]
18 changes: 18 additions & 0 deletions 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/).

0 comments on commit f571a41

Please sign in to comment.