Switch to a JRE 23 base image on Alpine#29
Conversation
... plus use a multi-stage build to remove wget from the final image
| @@ -1,15 +1,24 @@ | |||
| FROM eclipse-temurin:23-jdk | |||
| FROM eclipse-temurin:25-jre-alpine AS builder | |||
There was a problem hiding this comment.
Use OpenJDK JRE version 23 on Alpine, note the Dockerfile is using multi-stage builds now
| RUN apt-get update | ||
| RUN apt-get install -y wget unzip jq | ||
| RUN apk update && \ | ||
| apk add wget |
There was a problem hiding this comment.
only add wget since AFAIK jq and unzip aren't required??
| 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 && \ |
|
|
||
| RUN echo "CLI version:" && google-play-cli version | ||
| # copy the cli binaries | ||
| COPY --from=builder /opt/google-play-cli /opt/google-play-cli |
There was a problem hiding this comment.
copy in the binaries from the temporary builder image
| COPY --from=builder /opt/google-play-cli /opt/google-play-cli | ||
|
|
||
| # 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 && \ |
There was a problem hiding this comment.
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" ] |
There was a problem hiding this comment.
this is a breaking change: set the entrypoint to google-play-cli to execute automatically when docker run is used
|
|
||
| # set the entrypoint to the cli and default args to `--help` | ||
| ENTRYPOINT [ "google-play-cli" ] | ||
| CMD [ "--help" ] |
There was a problem hiding this comment.
set the default command line args to --help, if the user specifies anything else that will be used instead
00f2d71 to
c546aad
Compare
|
@craigminihan hey mate I'll take a look and will create a new release asap |
|
@craigminihan thanks for your contribution mate. I just have a few conerns about your PR:
I can't merge any breking compatibilities because this image is in use by AAA enterprise companies
|
Great project! I plan to make use of it from my GH workflows. This PR contains a few quality of life changes, so nothing critical and no new features.
I've made a number of changes to the Dockerfile as follows:
eclipse-temurin:23-jre-alpineas the base imagewgetand any other build-time tools don't end up on the final image/optrather than/usr/localand soft linkedgoogle-play-cliinto/usr/local/binwhich is on the path by defaultgoogle-play-clias theentrypointAdvantages
For example when invoking this version you'd use
docker run -ti --rm vacxe/google-play-clito see help rather thandocker run -ti --rm vacxe/google-play-cli google-play-cli --help.You can see the same approach to Dockerfile structure in the
anchore/grypeimage which is a great free image scanning tool, for example: https://github.com/anchore/grype/blob/9d54499415ad6f34426ce82082fa205a2e6bc45a/Dockerfile#L29 shows the entrypoint behaviour.