39 lines
1.0 KiB
Docker
39 lines
1.0 KiB
Docker
#FROM gradle:8-alpine
|
|
FROM gradle:8-jammy
|
|
#FROM alpine:latest
|
|
|
|
ENV CLI_TOOLS_VERSION=9477386
|
|
ENV CLI_TOOLS_HASH=bd1aa17c7ef10066949c88dc6c9c8d536be27f992a1f3b5a584f9bd2ba5646a0
|
|
ENV CLI_TOOLS_FILENAME="commandlinetools-liunx.zip"
|
|
|
|
ENV ANDROID_HOME="/sdk"
|
|
|
|
RUN apt-get update && apt-get install git curl
|
|
#RUN apk update
|
|
#RUN apk add bash git curl
|
|
#RUN apk add openjdk17
|
|
|
|
RUN mkdir /sdk
|
|
WORKDIR /sdk
|
|
|
|
COPY licenses ./licenses
|
|
|
|
RUN mkdir cmdline-tools
|
|
WORKDIR cmdline-tools
|
|
|
|
RUN curl "https://dl.google.com/android/repository/commandlinetools-linux-${CLI_TOOLS_VERSION}_latest.zip" --output "$CLI_TOOLS_FILENAME"
|
|
RUN echo "$CLI_TOOLS_HASH $CLI_TOOLS_FILENAME" > "${CLI_TOOLS_FILENAME}.sha256"
|
|
RUN cat "${CLI_TOOLS_FILENAME}.sha256"
|
|
RUN sha256sum $CLI_TOOLS_FILENAME | sha256sum -c
|
|
RUN unzip $CLI_TOOLS_FILENAME
|
|
RUN mv cmdline-tools latest
|
|
|
|
WORKDIR /sdk
|
|
#RUN ./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33"
|
|
#RUN ./cmdline-tools/latest/bin/sdkmanager "build-tools"
|
|
|
|
|
|
COPY build.sh /
|
|
|
|
CMD ["/bin/bash", "/build.sh"]
|