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

Commit f571a41

Browse files
committed
Adds Dockerfile for CLI.
1 parent d6f6bfd commit f571a41

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

cli/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM openjdk:8 AS build
2+
3+
ARG CLI_VERSION="0.3.0"
4+
5+
RUN curl -s https://codeload.github.com/apiman/apiman-cli/zip/v${CLI_VERSION} -o /tmp/apiman-cli-${CLI_VERSION}.zip && \
6+
unzip /tmp/apiman-cli-${CLI_VERSION}.zip -d /tmp && \
7+
mv /tmp/apiman-cli-${CLI_VERSION} /tmp/apiman-cli && \
8+
chmod +x /tmp/apiman-cli/gradlew
9+
10+
WORKDIR /tmp/apiman-cli
11+
RUN ./gradlew shadowJar
12+
13+
FROM openjdk:8-jre-alpine
14+
15+
RUN mkdir -p /opt/apiman-cli/lib
16+
COPY --from=build /tmp/apiman-cli/build/libs/* /opt/apiman-cli/lib/
17+
18+
ENTRYPOINT [ "java", "-jar", "/opt/apiman-cli/lib/apiman-cli.jar" ]

cli/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiman cli
2+
==========
3+
4+
## Usage
5+
6+
To use apiman CLI
7+
8+
docker run -it apiman/cli [args]
9+
10+
For valid arguments, please see the documentation for [apiman CLI](https://github.com/apiman/apiman-cli)
11+
12+
## Building the image
13+
14+
docker build -t="apiman/cli" --rm .
15+
16+
## Image accessible on Docker hub
17+
18+
This image is automatically built and published into [Docker Hub](https://registry.hub.docker.com/u/apiman/cli/).

0 commit comments

Comments
 (0)