Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
FROM eclipse-temurin:23-jdk
FROM eclipse-temurin:23-jre-alpine AS builder

ARG PLAY_CLI_VERSION

RUN apt-get update
RUN apt-get install -y wget unzip jq
RUN apk update && \
apk add wget
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only add wget since AFAIK jq and unzip aren't required??


# Install released Version from artefacts
RUN wget -q "https://github.com/Vacxe/google-play-cli-kt/releases/download/$PLAY_CLI_VERSION/google-play-cli.tar" && \
tar -xvf "google-play-cli.tar" -C /usr/local && \
RUN wget -q "https://github.com/Vacxe/google-play-cli-kt/releases/download/${PLAY_CLI_VERSION}/google-play-cli.tar" && \
tar -xvf "google-play-cli.tar" -C /opt && \
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untar to /opt now

rm "google-play-cli.tar"

ENV PATH="${PATH}:/usr/local/google-play-cli/bin/"
FROM eclipse-temurin:23-jre-alpine AS app

RUN echo "CLI version:" && google-play-cli version
# copy the cli binaries
COPY --from=builder /opt/google-play-cli /opt/google-play-cli
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy in the binaries from the temporary builder image


# soft link the cli to /usr/local/bin and check it works ok
RUN ln -s /opt/google-play-cli/bin/google-play-cli /usr/local/bin/google-play-cli && \
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soft link google-play-cli into /usr/local/bin which is on the path already

echo "CLI version:" && google-play-cli version

# set the entrypoint to the cli and default args to `--help`
ENTRYPOINT [ "google-play-cli" ]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change: set the entrypoint to google-play-cli to execute automatically when docker run is used

CMD [ "--help" ]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set the default command line args to --help, if the user specifies anything else that will be used instead