Skip to content

Commit

Permalink
Merge pull request #2 from felipecrs/docker
Browse files Browse the repository at this point in the history
Add docker container definition
  • Loading branch information
felipebz committed Aug 15, 2021
2 parents 145cda9 + 17ba45c commit 58af14c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
source-test/
.gradle/
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM adoptopenjdk:11 AS builder

COPY . /app

RUN cd /app && \
./gradlew build && \
cd build/distributions && \
mv -f zpa-cli-*.tar zpa-cli.tar

FROM adoptopenjdk:11-jre

COPY --from=builder /app/build/distributions/zpa-cli.tar /opt/

RUN cd /opt && \
tar xvf zpa-cli.tar && \
rm -f zpa-cli.tar && \
mv -f zpa-cli-*/ zpa-cli/

ENV PATH=/opt/zpa-cli/bin:$PATH

WORKDIR /wd

CMD [ "zpa-cli", "--help" ]

0 comments on commit 58af14c

Please sign in to comment.